Hi I would like to trace my application and put all messages in a text file. I use Trace.TraceError(""); Trace.TraceInformation(""); Trace.TraceWarning(""); methods and when TraceSwitch level is set to for instance Error all messages are put in a file? Why? I thought when I set TraceSwitch (ts) to Error only TraceError messages would be sent. I would like to change only trace level and certain messages should autmatically be put in a file. Should I use Trace.WriteIf(ts.TraceError == true,"..."); What for if TraceError, TraceWarning etc.??? Ela
e_LA
Posts
-
tracing -
DataGridViewCell formatI do not want to filter these records but show them and to not show 0 but ' ' (blank space)
-
DataGridViewCell formatHi I have one column which contains numeric data. If data is 0 I would like to display ''. How can I do that? Set any format? thanks for help Ela
-
global settingsColin, When I was waiting for the answer I managed to do that in such a way you explained and it works! I can make a few changes after reading you responses. Many thanks for the explanation! ...very strange this singleton pattern :-) I had problems with saving settings but I created public method in singleton and called settings save method. Redards Ela
-
global settings...but where to create the object of settings class?
-
global settingsColin, Could you provide me with any example for such a specific project? I have one class e.g. public class MyAppSettings : ApplicationSettingsBase { [UserScopedSetting()] [DefaultSettingValueAttribute("true")] [global::System.Configuration.ApplicationScopedSettingAttribute()] public bool someProperty { get { return (bool)this["someProperty"]; } set { this["someProperty"] = value; } } Then I have to create a project dealing with the setting. I suppose it should contain class with static properties?? Could you give me an example? Thanks Ela
-
global settingsI think do not undrestand everything. I have many projects in solution and in almost all of them I need see global varialbes. Do I have to add a references to my "global" class with settings and create an object. There is something wrong. Ela
-
global settingsI understand I have to create an object of settings class in each project? Ela
-
global settingsIf I knew I wouldn't ask. I thought there is an easier way to do with global settings in Framework 2.0. Ela
-
global settingsI thought so... Thanks for confirmation. I wondered if there is another way but I suppose not. Ela
-
global settingsHi I have a big solution which contains many projects. I created a class public class MySettingClass:ApplicationSettingsBase which contains a few settings. I would like to have an access to these variables from almost all projects. How to do that in the most efficient way? When I want to use any setting variable I create an object public MySettingClass mySettings = new MySettingClass(); how to make it visible in all projects in solution? I do not want to pass any parameters (there would be too many changes). Do I have to create an object in each project? No sense. Thanks for help Ela
-
Forcing repainting the cellSuch a life of developer :-)
-
Forcing repainting the cellWhat a fool I am. How couldn't I see such a beatifull protperty - just DataGridView. Many thanks for help. It is blinking now but there is something with gif. It is displayed as x - as it was no gif. However I think it is another problem. Many thanks one more time Ela
-
Forcing repainting the cellI created my own classes public class ImageCell : DataGridViewImageCell { public ImageCell(DataGridView grid) { this.grid = grid; } ........ private void animate(object o, EventArgs e) { DataGridView dgv = (DataGridView)grid; dgv.InvalidateCell(this); /// there is an error } } and public class ImageColumn : DataGridViewColumn { public ImageColumn(DataGridView dgv) { this.CellTemplate = new ImageCell(dgv); this.HeaderText = ""; this.Width = 25; this.Resizable = DataGridViewTriState.False; } } In my application when I have DataGridView I just add ImageColumn object as new column passing DataGridView object to the constructor: ImageColumn imgCol = new ImageColumn(m_DataGridView); m_DataGridView.Columns.Add(imgCol); I do not like to pass such a parameter to the constructor. However how to call InvalidateCell in ImageCell class? thanks Ela
-
Forcing repainting the cellI think I am near the solution however how to call a method of grid being on DataGridViewImageCell level?
-
Forcing repainting the cellThere is a method grid.InvalidateCell however I cannot call it because I have to do it from DataGridViewImageCell level (form my own class). I described the problem above. Thanks for advice.
-
Forcing repainting the cellBut DataGridViewImageCell does not have a Invalidate method.
-
Forcing repainting the cellI crated my own class inherited from DataGridViewImageCell. How can I call a method from parent object which is DataGridView? I passed a DataGridView parameter to constructor but when I call grid.InvalidateCell() I have a message "Object refrence not set to an instance of an object"
-
Forcing repainting the cellHi Is it possible to force DataGridViewCell to repaint? Just refreshing it. Thanks Ela
-
Animated gif in DataGridViewHi Does somebody know if it is possible to display animated gif in a cell in DataGridView and how to do it? Thanks Ela