Search Results

Search found 17342 results on 694 pages for 'custom draw'.

Page 22/694 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • How do I set the next available custom color in the ColorDialog?

    - by Hannah
    I'm currently coding in VB.net. A user places the cursor in a table cell and clicks on "Table Background Color" to edit the current background colour. Currently I have been able to detect the current colour (for instance a light blue) and set that colour in the ColorDialog (Colour swatches are correct and RGB values are correct). What I would like to do is enable the user to click on the "Add to Custom Colors" to save the colour. Problem is, it sets the first square in the custom colours area (which happens to already be filled in with another custom colour), rather than finding the next square that is white and set it there instead. Is this possible? If the user selects a new custom colour square when they first load the ColorDialog, the current colour (light blue) disappears and the colour swatches and RGB values are set as white. Thanks

    Read the article

  • Custom activity designers in Workflow Foundation 3.5: How do they work?

    - by stakx
    Intent of this post: I realise that Workflow Foundation is not extremely popular on StackOverflow and that there will probably be not many answers, or none at all. This post is intended as a resource to people trying to customise workflow activities' appearance through custom designer classes. Goals: I am attempting to create a custom designer class for Workflow activities to achieve the following: Make activities look less technical. For example, I don't necessarily want to see the internal object name as the activity's "title" -- instead, I'd like to see something more descriptive. Display the values of certain properties beneath the title text. I would like to see some properties' values directly underneath the title so that I don't need to look somewhere else (namely, at the Properties window). Provide custom drop areas and draw custom internal arrows. As an example, I would like to be able to have custom drop areas in very specific places. What I found out so far: I created a custom designer class deriving from SequentialActivityDesigner as follows: [Designer(typeof(SomeDesigner))] public partial class SomeActivity: CompositeActivity { ... } class PlainDesigner : SequentialActivityDesigner { ... } Through overriding some properties and the OnPaint method, I found out about the following correspondences between the properties and how the activity will be displayed: Figure 1. Relationship between some properties of an SequentialActivityDesigner and the displayed activity. Possible solutions for goal #1 (make activities look less technical) and goal #2 (display values of properties beneath title text): The displayed title can be changed through the Title property. If more room is required to display additional information beneath the title, the TitleHeight property can be increased (ie., override the property and make it return base.TitleHeight + n, where n is some positive integer). Override the OnPaint method and draw additional text in the area reserved through TitleHeight. Open questions: What are the connectors, connections, and connection points used for? They seem to be necessary, but for what purpose? While the drop targets can be got through the GetDropTargets method, it seems that this is not necessarily where the designer will actually place dropped activities. When an activity is dragged across a workflow, the designer displays little green plus signs where activities can be dropped; how does it figure out the locations of these plus signs? How does the designer figure out where to draw connector lines and arrows?

    Read the article

  • How will you register a custom view engine where in the Areas will not be affected?

    - by Fleents
    I made a custom view engine for my application. ~/Themes/Default/Views.. And I have an Area called Admin. Area/Admin/Views.. I register my custom view engine in Global.asax : RegisterViewEngines(ViewEngines.Engines); AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); When I browsed my admin site, it cant find the views.. I know its because of my custom view engine.. But how can you register new custom view engine without affecting the view engine of areas?

    Read the article

  • How to make Custom contol look like other ToolStrip Items?

    - by nils_gate
    I have created a Custom Hosted Control using ToolStripControlHost and put it in a ToolStrip. Everything is working as expected. But my custom control does not look like other items in ToolStrip. How to make my custom control take the look and feel from ToolStripRenderer? or How to make it look like other items in ToolStrip?

    Read the article

  • How to make area outside of custom dialog view unclickable?

    - by portfoliobuilder
    I created a custom dialog (no, this is not dialog object) from an image and some other views. The conflict I am having with this custom dialog (again, this is a layout) is that the area around it closes the custom dialog. Is there a way I can make the outside area unclickable? I have tried wrapping the dialog view with a fullscreen frameLayout w/ transparent background, and then programmatically I set the frame attribute to setClickable(false). framelayout.setClickable(false); This does nothing. It still closes the dialog. Any other suggestions? Thank you in advance. This is my code: //used to disable background from closing the custom dialog private FrameLayout fl; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.layout_dialog); btnContinue = (Button) findViewById(R.id.btnContinue); btnContinue.setOnClickListener(this); fl.setClickable(false); //background suppose to lock } @Override public void onClick(View v) { // TODO Auto-generated method stub switch (v.getId()) { case R.id.Continue: finish(); } break; } } I also have another class for broadcastReceiver public class DialogManagerBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if(IdeaPlayInterfaceApplication.isActivityVisible()){ Intent i=new Intent(context,CustomDialogActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); } } } The idea is that this custom dialog is not called at a specific instance, it is called every set amount of time no matter what I am doing in the application. I use an Intent and PendingIntent to repeatedly call this custom dialog over time. With something like this: cancelAlarmNotificationMonitoring(context); Calendar calendar = Calendar.getInstance(); Intent intent = new Intent(context, AlarmManagerBroadcastReceiver.class); PendingIntent pintent = PendingIntent.getBroadcast(context, 0, intent, 0); AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarm.setRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis()+ALARM_INTERVAL,ALARM_INTERVAL, pintent); Hopefully this is more clear now.

    Read the article

  • Mouse input not updating in custom XNA/Winforms panel

    - by ChocoMan
    I have a custom Panel residing within my WinForm. the custom Panel holds the XNA rendering. So far, I've rendered an 3D test model. What I'm doing now is trying to handle the input.Using a camera from another working game, keyboard input works fine moving the camera in all 6 directions. But when it comes to handling the mouse to yaw and pitch the camera, nothing happens. I've searched about to see if anyone has come across this problem, but found no testable solutions to my problem. Does anyone understand as to what may be causing the Mouse not to be called when moved? Within MainForm constructor: public MainForm() { InitializeComponent(); Mouse.WindowHandle = panel3D.Handle; } Panel3D.cs Custom XNA Panel class FreeCamera.cs FreeCamera class

    Read the article

  • set installer background / not able to run early_command in custom preseed file (precise)

    - by user73093
    I have a custom preseed file for a Precise Live CD (which is well loaded on boot, I checked syslog for that). My initial problem is that when booting in install mode (default behavior for a Live CD), ubiquity runs X with a default wallpaper which is hardcoded to /usr/share/backgrounds/warty-final-ubuntu.png in Ubiquity code. So my idea was to run early_command (https://help.ubuntu.com/12.04/installation-guide/i386/preseed-advanced.html) to copy my custom wallpaper over /usr/share/backgrounds/warty-final-ubuntu.png. Assuming my custom wallpaper allready resides on the rootfs in /usr/share/backgrounds. But... It seems the early_command never runs (and I'm sure the preseed file is taken into account) Here is what I have added to my preseed file: d-i preseed/early_command string cp /usr/share/backgrounds/mywallpaper-defaults.jpg /usr/share/backgrounds/warty-final-ubuntu.png Even this one is never run: d-i preseed/early_command string /usr/bin/touch /tmp/testearly Thanks for helping !!

    Read the article

  • Multiple values for a specif custom variable in Google Analytics

    - by Nicola Pacini
    we're trying to get rid of a this question : would it be possible to setup more than one value in a custom variable in Google Analytics, at page level ? Eg: _gaq.push(['_setCustomVar',3,'Tag','Custom Variables',3]); We'd like to track most popular tags on a web site who publishes news, articles and stuff. Contents are categorized (each content belongs to one category) and tagged (1 or more tags for each article). So, we'd like to apply this code: _gaq.push(['_setCustomVar',3,'Tag','Custom Variables',3]); _gaq.push(['_setCustomVar',3,'Tag','Google Analytics',3]); in a page that shows an article with these two tags assigned. What do you think? Honestly I didn't find anything in documentation from Google and some other example sites. Many thanks! Nicola

    Read the article

  • Managing Custom Series

    - by user702295
    Custom series that have been added should be done with client Defined Prefix, ex. ACME Final Forecast, so they are can be identified as non-standard series.  With that said, it is not always done, so beginning in v7.3.0 there is a new column called Application_Id in the Computed_Fields table.  This is the table that stores the Series information.  Standard Series will have have a prefix similar to COMPUTED_FIELD, while a custom series will have an Application_Id value similar to 9041128B99FC454DB8E8A289E5E8F0C5. So a SQL that will return the list of custom series in your database might look something like this: select computed_title Series_Name, application_id from computed_fields where application_id not like '%COMPUTED_FIELD%' order by 1;

    Read the article

  • Managing Custom Series

    - by user702295
    Custom series that have been added should be done with client Defined Prefix, ex. ACME Final Forecast, so they are can be identified as non-standard series.  With that said, it is not always done, so beginning in v7.3.0 there is a new column called Application_Id in the Computed_Fields table.  This is the table that stores the Series information.  Standard Series will have have a prefix similar to COMPUTED_FIELD, while a custom series will have an Application_Id value similar to 9041128B99FC454DB8E8A289E5E8F0C5. So a SQL that will return the list of custom series in your database might look something like this: select computed_title Series_Name, application_id from computed_fields where application_id not like '%COMPUTED_FIELD%' order by 1;

    Read the article

  • How To Create Custom Keyboard Shortcuts For Browser Actions and Extensions in Google Chrome

    - by Chris Hoffman
    Geeks love keyboard shortcuts – they can make you faster and more productive than clicking everything with your mouse. We’ve previously covered keyboard shortcuts for Chrome and other browsers, but you can assign your own custom keyboard shortcuts, too. Google Chrome includes a built-in way to assign custom keyboard shortcuts to your browser extensions. You can also use an extension created by a Google employee to create custom keyboard shortcuts for common browser actions – and less common ones. Image Credit: mikeropology on Flickr (modified) Can Dust Actually Damage My Computer? What To Do If You Get a Virus on Your Computer Why Enabling “Do Not Track” Doesn’t Stop You From Being Tracked

    Read the article

  • Keyboard shorcut for a custom folder in Desktop

    - by palerdot
    I would like to configure a keyboard shortcut for a particular folder in my Desktop. I will be using this folder quite often and is there a way to open them with a custom keyboard shortcut ? The remote thing I came across regarding this is this question which is for opening home folder similar to Windows, but I do not want to go to home folder and navigate from there all the way to a folder in the Desktop (mouse clicking the desktop folder is way too easier than this method). So my Question: Can I have custom keyboard shortcuts for custom folders like folders in Desktop ? I'm using 12.04.

    Read the article

  • OpenGL, draw two polygons in the same time (by mouse clicks)

    - by YoungSalafi
    im trying to draw 2 polygons at the same time depending on user input from the opengl screen... so i made 2 arrays which each one of them will carry the vertices of each polygon ... i think my logic is right but the program still prints only polygon and delete the old polygon if you draw a polygon again . and its acting weird too please check the code yourself here it is : P.S dont mind the delete function right now.. i know it missing something. #include <windows.h> #include <gl/gl.h> #include <gl/glut.h> void Draw(); void Set_Transformations(); void Initialize(int argc, char *argv[]); void OnKeyPress(unsigned char key, int x, int y); void DeleteVer(); void MouseClick(int bin, int state , int x , int y); void GetOGLPos(int x, int y,float* arrY,float* arrX); void DrawPolygon(float* arrX,float* arrY); float xPos[20]; float yPos[20]; float xPos2[20]; float yPos2[20]; float fx = 0,fy = 0; float size = 10; int count = 0; bool done = false; bool flag = true; void Initialize(int argc, char *argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGBA); glutInitWindowPosition(100, 100); glutInitWindowSize(600, 600); glutCreateWindow("OpenGL Lab1"); Set_Transformations(); glutDisplayFunc(Draw); glutMouseFunc(MouseClick); glutKeyboardFunc(OnKeyPress); glutMainLoop(); } void Set_Transformations() { glClearColor(1, 1, 1, 1); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(-200, 200, -200, 200); } void OnKeyPress(unsigned char key, int x, int y) { if (key == 27) exit(0); switch(key) { case 13: //enter key it will draw done = true; glutPostRedisplay(); flag=!flag; // this flag to switch to the other array that the vertices will be stored in, in order to draw the second polygon break; } } void MouseClick(int button, int state , int x , int y) { switch (button) { case GLUT_RIGHT_BUTTON: if (state == GLUT_DOWN) { if (count>0) { DeleteVer(); //dont mind this right now } } break; case GLUT_LEFT_BUTTON: if (state == GLUT_DOWN) { if(count<20) { if(flag =true){ // drawing first polygon GetOGLPos(x, y,xPos,yPos);} if (flag=false) //drawing second polygon after Enter is pressed GetOGLPos(x, y,xPos2,yPos2); } } break; } } void GetOGLPos(int x, int y,float* arrY,float* arrX) //getting the vertices from the user { GLint viewport[4]; GLdouble modelview[16]; GLdouble projection[16]; GLfloat winX, winY, winZ; GLdouble posX, posY, posZ; glGetDoublev( GL_MODELVIEW_MATRIX, modelview ); glGetDoublev( GL_PROJECTION_MATRIX, projection ); glGetIntegerv( GL_VIEWPORT, viewport ); winX = (float)x; winY = (float)viewport[3] - (float)y; glReadPixels( x, int(winY), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &winZ ); gluUnProject( winX, winY, winZ, modelview, projection, viewport, &posX, &posY, &posZ); arrX[count] = posX; arrY[count] = posY; count++; glPointSize( 6.0 ); glBegin(GL_POINTS); glVertex2f(posX,posY); glEnd(); glFlush(); } void DeleteVer(){ //dont mind this glColor3f ( 1, 1, 1); glBegin(GL_POINTS); glVertex2f(xPos[count-1],yPos[count-1]); glEnd(); glFlush(); xPos[count] = NULL; yPos[count] = NULL; count--; glColor3f ( 0, 0, 0); } void DrawPolygon(float* arrX,float* arrY) { int n=0; glColor3f ( 0, 0, 0); glBegin(GL_POLYGON); while(n<count) { glVertex2f(arrX[n],arrY[n]); n++; } count=0; glEnd(); glFlush(); } void Draw() //main drawing func { glClear(GL_COLOR_BUFFER_BIT); glColor3f(0, 0, 0); if(done) { DrawPolygon(xPos,yPos); DrawPolygon(xPos2,yPos2); } glFlush(); } int main(int argc, char *argv[]) { Initialize(argc, argv); return 0; }

    Read the article

  • Customize Team Build 2010 – Part 12: How to debug my custom activities

    In the series the following parts have been published Part 1: Introduction Part 2: Add arguments and variables Part 3: Use more complex arguments Part 4: Create your own activity Part 5: Increase AssemblyVersion Part 6: Use custom type for an argument Part 7: How is the custom assembly found Part 8: Send information to the build log Part 9: Impersonate activities (run under other credentials) Part 10: Include Version Number in the Build Number Part 11: Speed up opening my build process template Part 12: How to debug my custom activities Part 13: Get control over the Build Output Part 14: Execute a PowerShell script Part 15: Fail a build based on the exit code of a console application       Developers are “spoilt” persons who expect to be able to have easy debugging experiences for every technique they work with. So they also expect it when developing custom activities for the build process template. This post describes how you can debug your custom activities without having to develop on the build server itself. Remote debugging prerequisites The prerequisite for these steps are to install the Microsoft Visual Studio Remote Debugging Monitor. You can find information how to install this at http://msdn.microsoft.com/en-us/library/bt727f1t.aspx. I chose for the option to run the remote debugger on the build server from a file share. Debugging symbols prerequisites To be able to start the debugging, you need to have the pdb files on the buildserver together with the assembly. The pdb must have been build with Full Debug Info. Steps In my setup I have a development machine and a build server. To setup the remote debugging, I performed the following steps Locate on your development machine the folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger Create a share for the Remote Debugger folder. Make sure that the share (and the folder) has the correct permissions so the user on the build server has access to the share. On the build server go to the shared “Remote Debugger” folder Start msvsmon.exe which is located in the folder that represents the platform of the build server. This will open a winform application like   Go back to your development machine and open the BuildProcess solution. Start the Attach to process command (Ctrl+Alt+P) Type in the Qualifier the name of the build server. In my case the user account that has started the msvsmon is another user then the user on my development machine. In that case you have to type the qualifier in the format that is shown in the Remote Debugging Monitor (in my case LOCAL\Administrator@TFSLAB) and confirm it by pressing <Enter> Since the build service is running with other credentials, check the option “Show processes from all users”. Now the Attach to process dialog shows the TFSBuildServiceHost process Set the breakpoint in the activity you want to debug and kick of a build. Be aware that when you attach to the TFSBuildServiceHost that you debug every single build that is run by this windows service, so make sure you don’t debug the build server that is in production! You can download the full solution at BuildProcess.zip. It will include the sources of every part and will continue to evolve.

    Read the article

  • Custom Templates: Using user exits

    - by Anthony Shorten
    One of the features of Oracle Utilities Application Framework V4.1 is the ability to use templates and user exits to extend the base configuration files. The configuration files used by the product are based upon a set of templates shipped with the product. When the configureEnv utility asks for configuration settings they are stored in a configuration file ENVIRON.INI which outlines the environment settings. These settings are then used by the initialSetup utility to populate the various configuration files used by the product using templates located in the templates directory of the installation. Now, whilst the majority of the installations at any site are non-production and the templates provided are generally adequate for that need, there are circumstances where extension of templates are needed to take advantage of more advanced facilities (such as advanced security and environment settings). The issue then becomes that if you alter the configuration files manually (directly or indirectly) then you may lose all your custom settings the next time you run initialSetup. To counter this we allow customers to either override templates with their own template or we now provide user exits in the templates to add fragments of configuration unique to that part of the configuration file. The latter means that the base template is still used but additions are included to provide the extensions. The provision of custom templates is supported but as soon as you use a custom template you are then responsible for reflecting any changes we put in the base template over time. Not a big task but annoying if you have to do it for multiple copies of the product. I prefer to use user exits as they seem to represent the least effort solution. The way to find the user exits available is to either read the Server Administration Guide that comes with your product or look at individual templates and look for the lines: #ouaf_user_exit <user exit name> Where <user exit name> is the name of the user exit. User exits are not always present but are in places that we feel are the most likely to be changed. If a user exit does not exist the you can always use a custom template instead. Now lets show an example. By default, the product generates a config.xml file to be used with Oracle WebLogic. This configuration file has the basic setting contained in it to manage the product. If you want to take advantage of the Oracle WebLogic advanced settings, you can use the console to make those changes and it will be reflected in the config.xml automatically. To retain those changes across invocations of initialSetup, you need to alter the template that generates the config.xml or use user exits. The technique is this. Make the change in the console and when you save the change, WebLogic will reflect it in the config.xml for you. Compare the old version and new version of the config.xml and determine what to add and then find the user exit to put it in by examining the base template. For example, by default, the console is not automatically deployed (it is deployed on demand) in the base config.xml. To make the console deploy, you can add the following line to the templates/CM_config.xml.win.exit_3.include file (for windows) or templates/CM_config.xml.exit_3.include file (for linux/unix): <internal-apps-deploy-on-demand-enabled>false</internal-apps-deploy-on-demand-enabled> Now run initialSetup to reflect the change and if you check the splapp/config/config.xml file you will see the change applied for you. Now how did I know which include file? I check the template for config.xml and found there was an user exit at the right place. I prefixed my include filename with "CM_" to denote it as a custom user exit. This will tell the upgrade tools to leave that file alone whenever you decide to upgrade (or even apply fixes). User exits can be powerful and allow customizations to be added for advanced configuration. You will see products using Oracle Utilities Application Framework use this exits themselves (usually prefixed with the product code). You are also taking advantage of them.

    Read the article

  • [C#][XNA] Draw() 20,000 32 by 32 Textures or 1 Large Texture 20,000 Times

    - by Rudi
    The title may be confusing - sorry about that, it's a poor summary. Here's my dilemma. I'm programming in C# using the .NET Framework 4, and aiming to make a tile-based game with XNA. I have one large texture (256 pixels by 4096 pixels). Remember this is a tile-based game, so this texture is so massive only because it contains many tiles, which are each 32 pixels by 32 pixels. I think the experts will definitely know what a tile-based game is like. The orientation is orthogonal (like a chess board), not isometric. In the Game.Draw() method, I have two choices, one of which will be incredibly more efficient than the other. Choice/Method #1: Semi-Pseudocode: public void Draw() { // map tiles are drawn left-to-right, top-to-bottom for (int x = 0; x < mapWidth; x++) { for (int y = 0; y < mapHeight; y++) { SpriteBatch.Draw( MyLargeTexture, // One large 256 x 4096 texture new Rectangle(x, y, 32, 32), // Destination rectangle - ignore this, its ok new Rectangle(x, y, 32, 32), // Notice the source rectangle 'cuts out' 32 by 32 squares from the texture corresponding to the loop Color.White); // No tint - ignore this, its ok } } } Caption: So, effectively, the first method is referencing one large texture many many times, each time using a small rectangle of this large texture to draw the appropriate tile image. Choice/Method #2: Semi-Pseudocode: public void Draw() { // map tiles are drawn left-to-right, top-to-bottom for (int x = 0; x < mapWidth; x++) { for (int y = 0; y < mapHeight; y++) { Texture2D tileTexture = map.GetTileTexture(x, y); // Getting a small 32 by 32 texture (different each iteration of the loop) SpriteBatch.Draw( tileTexture, new Rectangle(x, y, 32, 32), // Destination rectangle - ignore this, its ok new Rectangle(0, 0, tileTexture.Width, tileTexture.Height), // Notice the source rectangle uses the entire texture, because the entire texture IS 32 by 32 Color.White); // No tint - ignore this, its ok } } } Caption: So, effectively, the second method is drawing many small textures many times. The Question: Which method and why? Personally, I would think it would be incredibly more efficient to use the first method. If you think about what that means for the tile array in a map (think of a large map with 2000 by 2000 tiles, let's say), each Tile object would only have to contain 2 integers, for the X and Y positions of the source rectangle in the one large texture - 8 bytes. If you use method #2, however, each Tile object in the tile array of the map would have to store a 32by32 Texture - an image - which has to allocate memory for the R G B A pixels 32 by 32 times - is that 4096 bytes per tile then? So, which method and why? First priority is speed, then memory-load, then efficiency or whatever you experts believe.

    Read the article

  • Custom edit box - how to do it?

    - by user3834459
    I'd like to create a new text editor with some non-standard capabilities for the edit box where you would normally type your code (and do syntax highlighting). Since I'd like to have complete control over this I was thinking how should I proceed.. my target is primarily linux and I was thinking to use GTK+ as GUI toolkit. Since I'm a newbie I'm not sure how custom controls are drawn/rendered. Should I consider using openGL to draw a control from scratch? That doesn't sound right to be honest but I have no idea on how to do it.. The "nonstandard capabilities" would include drawing stuff on the control (shapes and boxes) at any position, being able to write into multiple areas.. all stuff you can't normally do with an edit box. Question: How should I create a GTK+ nonstandard GUI control like an edit box that has the following capabilities: edit text, select text, delete text, draw message boxes on top of it, draw images inside it (under and/or on top of the text), insert text into multiple places at the same time? Should I subclass an edit box control or should I "render" an entirely new one with openGL or such? I'm still in the design phase (I even need to identify the frameworks I should use) and I've taken a look at the Chromium project (GTK+). I haven't found anything that suited my problem

    Read the article

  • TFS 2010 Build Custom Activity for Merging Assemblies

    - by Jakob Ehn
    *** The sample build process template discussed in this post is available for download from here: http://cid-ee034c9f620cd58d.office.live.com/self.aspx/BlogSamples/ILMerge.xaml ***   In my previous post I talked about library builds that we use to build and replicate dependencies between applications in TFS. This is typically used for common libraries and tools that several other application need to reference. When the libraries grow in size over time, so does the number of assemblies. So all solutions that uses the common library must reference all the necessary assemblies that they need, and if we for example do a refactoring and extract some code into a new assembly, all the clients must update their references to reflect these changes, otherwise it won’t compile. To improve on this, we use a tool from Microsoft Research called ILMerge (Download from here). It can be used to merge several assemblies into one assembly that contains all types. If you haven’t used this tool before, you should check it out. Previously I have implemented this in builds using a simple batch file that contains the full command, something like this: "%ProgramFiles(x86)%\microsoft\ilmerge\ilmerge.exe" /target:library /attr:ClassLibrary1.bl.dll /out:MyNewLibrary.dll ClassLibrary1.dll ClassLibrar2.dll ClassLibrary3.dll This merges 3 assemblies (ClassLibrary1, 2 and 3) into a new assembly called MyNewLibrary.dll. It will copy the attributes (file version, product version etc..) from ClassLibrary1.dll, using the /attr switch. For more info on ILMerge command line tool, see the above link. This approach works, but requires a little bit too much knowledge for the developers creating builds, therefor I have implemented a custom activity that wraps the use of ILMerge. This makes it much simpler to setup a new build definition and have the build automatically do the merging. The usage of the activity is then implemented as part of the Library Build process template mentioned in the previous post. For this article I have just created a simple build process template that only performs the ILMerge operation.   Below is the code for the custom activity. To make it compile, you need to reference the ILMerge.exe assembly. /// <summary> /// Activity for merging a list of assembies into one, using ILMerge /// </summary> public sealed class ILMergeActivity : BaseCodeActivity { /// <summary> /// A list of file paths to the assemblies that should be merged /// </summary> [RequiredArgument] public InArgument<IEnumerable<string>> InputAssemblies { get; set; } /// <summary> /// Full path to the generated assembly /// </summary> [RequiredArgument] public InArgument<string> OutputFile { get; set; } /// <summary> /// Which input assembly that the attibutes for the generated assembly should be copied from. /// Optional. If not specified, the first input assembly will be used /// </summary> public InArgument<string> AttributeFile { get; set; } /// <summary> /// Kind of assembly to generate, dll or exe /// </summary> public InArgument<TargetKindEnum> TargetKind { get; set; } // If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { string message = InputAssemblies.Get(context).Aggregate("", (current, assembly) => current + (assembly + " ")); TrackMessage(context, "Merging " + message + " into " + OutputFile.Get(context)); ILMerge m = new ILMerge(); m.SetInputAssemblies(InputAssemblies.Get(context).ToArray()); m.TargetKind = TargetKind.Get(context) == TargetKindEnum.Dll ? ILMerge.Kind.Dll : ILMerge.Kind.Exe; m.OutputFile = OutputFile.Get(context); m.AttributeFile = !String.IsNullOrEmpty(AttributeFile.Get(context)) ? AttributeFile.Get(context) : InputAssemblies.Get(context).First(); m.SetTargetPlatform(RuntimeEnvironment.GetSystemVersion().Substring(0,2), RuntimeEnvironment.GetRuntimeDirectory()); m.Merge(); TrackMessage(context, "Generated " + m.OutputFile); } } [Browsable(true)] public enum TargetKindEnum { Dll, Exe } NB: The activity inherits from a BaseCodeActivity class which is an internal helper class which contains some methods and properties useful for moste custom activities. In this case, it uses the TrackeMessage method for writing to the build log. You either need to remove the TrackMessage method calls, or implement this yourself (which is not very hard… ) The custom activity has the following input arguments: InputAssemblies A list with the (full) paths to the assemblies to merge OutputFile The name of the resulting merged assembly AttributeFile Which assembly to use as the template for the attribute of the merged assembly. This argument is optional and if left blank, the first assembly in the input list is used TargetKind Decides what type of assembly to create, can be either a dll or an exe Of course, there are more switches to the ILMerge.exe, and these can be exposed as input arguments as well if you need it. To show how the custom activity can be used, I have attached a build process template (see link at the top of this post) that merges the output of the projects being built (CommonLibrary.dll and CommonLibrary2.dll) into a merged assembly (NewLibrary.dll). The build process template has the following custom process parameters:   The Assemblies To Merge argument is passed into a FindMatchingFiles activity to located all assemblies that are located in the BinariesDirectory folder after the compilation has been performed by Team Build. Here is the complete sequence of activities that performs the merge operation. It is located at the end of the Try, Compile, Test and Associate… sequence: It splits the AssembliesToMerge parameter and appends the full path (using the BinariesDirectory variable) and then enumerates the matching files using the FindMatchingFiles activity. When running the build, you can see that it merges two assemblies into a new one:     And the merged assembly (and associated pdb file) is copied to the drop location together with the rest of the assemblies:

    Read the article

  • Custom Error, 404, 401 pages in SharePoint&hellip;

    - by Shawn Cicoria
    In WSS 3.0/MOSS 2007 we had to resort to things like HttpModules [1] for errors, access denied, or for 404 errors updating the WebApp properties [2] Well, in 2010, thanks to Andrew Connell for pointing this out, Todd Carter blogs about what we now have in SPS 2010 here: http://todd-carter.com/post/2010/04/07/An-Expected-Error-Has-Occurred.aspx    [1] http://blogs.msdn.com/ketaanhs/archive/2009/03/16/moss-sharepoint-2007-custom-error-page-and-access-denied-page.aspx [2] http://blogs.msdn.com/jingmeili/archive/2007/04/08/how-to-create-your-own-custom-404-error-page-and-handle-redirect-in-sharepoint-2007-moss.aspx

    Read the article

  • Building Custom HTTP Help Pages with WCF

    - by Jesse Ezell
    Been asked this a few times and needed to figure it out myself, so I put together a post on how to host custom HTTP help pages for your WCF services: http://blog.iserviceoriented.com/index.php/2010/05/04/building-custom-http-help-pages-with-wcf/ A little help from the WCF team to open up some of the internal classes would make it more straightforward... until them, it takes a bit of hacking and black magic.

    Read the article

  • adding custom SSIS transformation to visual studio toolbox fails

    - by ryangaraygay
    Just very recently I encountered an issue in deploying a custom SSIS component assembly which turns out to be a relative "no-brainer" error if only the clues were more straightforward. Basically after deploying the assembly I could not find my component listed in the "SSIS Data Flow Items" tab list.It turns out that the assembly containing the component just had missing or referenced the incorrect assemblies.I have outlined the steps I took that guided me on the right direction on this blog post of mine : adding custom SSIS transformation to visual studio toolbox fails 

    Read the article

  • Cannot add custom keyboard shortcut

    - by krasilich
    I'm trying to assign custom shortcut to launch my own script (I don't need it in terminal window, just launch it) So, I went to Settings - Keyboard - Shortcuts - Custom Shortcuts, pressed the button with "+" and entered the name of shortcut and the command itself. But then I cannot bind keys to that shortcut. I selected a new row and pressed needed keys (Shift + F3) and nothing happens. I can change the keys for system shortcuts, but do not have any luck with my own. Any ideas?

    Read the article

  • Configuration Data in a Custom Timer job in Sharepoint 2010 : The Hierarchical Object Store

    - by Gino Abraham
    I was planning for a custom timer job for which i wanted to store some configuration data. Was looking for some best practices, found a useful links on The Hierarchical Object store Store http://www.chaholl.com/archive/2011/01/30/the-skinny-on-sppersistedobject-and-the-hierarchical-object-store-in.aspxInitially was planning for a custom list, but this would make us run a cross site query and the list name and the url should again be kept in some configuration which is an headache to maintain. Hierarchical object store was zeroed in and thanks to google for the same :)

    Read the article

  • Custom wallpapers under "Appearance" are dissapearing [12.04]

    - by user73449
    When I add wallpapers via the little "+" under "Appearance Look" in the settings, I can select them and it works fine. But when I reopen the Appearance setting and want to change my wallpaper, the custom ones are gone. Why is this? Below is a screenshot of the empty custom wallpaper section. Unfortunately I don't know what this is called in English, so I have a hard time searching for my problem. http://i.stack.imgur.com/eyytG.png

    Read the article

  • Can not add custom keyboard shortcut

    - by krasilich
    I'm trying to assign custom shortcut to lunch my own script (I don't need it in terminal window, just lunch it) So, I went to Settings - Keyboard - Shortcuts - Custom Shortcuts press the button with "+" and enter the name of shortcut and the command itself. But then I cannot bind keys to that shortcut. I select new row and press needed keys (Shift + F3) and nothing happens. I can change the keys for system shortcuts, but do not have any luck with my own. Any ideas?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >