Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

NassosReyzidis

@NassosReyzidis
About
Posts
36
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Reflection: Getting property name from property itself
    N NassosReyzidis

    Hi there, I have an idea that i saw first in the WPF implementation, you can put some public static const variables in your object implementation so that you can call the appropriate property: public class MyObject { public static const string refTestPropertyName = "TestPropertyName"; private string _TestPropertyName; public string TestPropertyName { get{return _TestPropertyName;} set{_TestPropertyName=value;} } .... } now in your code: MyObject myObject = new MyObject(); myGrid.AddColumn(new ColumnDefn(myObject.refTestPropertyName , "", false, true)); Hope that helped Nassos

    "Success is the ability to go from one failure to another with no loss of enthusiasm." Winston Churchill "Quality means doing it right when no one is looking." Henry Ford

    C# css help

  • How to do math operations with generic function arguments?
    N NassosReyzidis

    try this : public T Mean(T[] vec) where T : Int32,Double,Fload,..... { tmp = default(T); //Return the default for each Primitive, for No primitive this is equal to null foreach (T v in vec) tmp += v; return (tmp / vec.Length) as T; //mask to the Generic type } Hope that helped Nassos

    "Success is the ability to go from one failure to another with no loss of enthusiasm." Winston Churchill "Quality means doing it right when no one is looking." Henry Ford

    C# c++ help tutorial question

  • Using NPlot .NET component in Access VBA
    N NassosReyzidis

    Hi there, First in the C# source Code (For VS2005), right click in the project select properties and goto Build section on the bottom select "register For COM Interop" (do that for all projects in the solution), now if you Build the Solution in the Debug/Release directory beside the .exe/.dll it will create .tlb files, now you need to register to the GAC, go to Start-->run and write: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regasm "YourPath"\YourDll.dll /codebase tlb:"YourPath"\YourDll.tlb /verbose now you can use the CreateObject from VBA to intatiate and you the assembly. PS. you have to register ALL dlls. Hope that helped. Nassos

    "Success is the ability to go from one failure to another with no loss of enthusiasm." Winston Churchill "Quality means doing it right when no one is looking." Henry Ford

    C# csharp com tutorial question

  • comparing two arrays
    N NassosReyzidis

    Guffa wrote:

    First sort the lists, then you can loop through them side by side

    He can loop through the first ArrayList and use the .Contains(object item) method for the second array list and not interate through both ArrayLists. just a thought

    Nassos.NET

    C# csharp data-structures question

  • Caller Id
    N NassosReyzidis

    Hi, Search the internet for TAPI is the API that will have to work with Hope that helped

    Nassos

    C# help tutorial question

  • Hi how can i get the value of Enum by decimal number
    N NassosReyzidis

    Hi there, this will return an array that you can loop: Array myArray = Enum.GetValues(typeof(YourEnum)); for the Data for the given (i) value: Enum.Parse(typeof(YourEnum),i.ToString()) Hope that helped

    Nassos

    C# question

  • Calling SatelliteAssembly in C#.NET
    N NassosReyzidis

    You can to that. ResourceManager rm = new ResourceManager( "Satellite"+System.Globalization.CultureInfo.CurrentCulture.Name, Assembly.GetExecutingAssembly() ); Nassos

    GanDad

    C# csharp learning

  • Timer Display data from database
    N NassosReyzidis

    Hi Jacklynn, i see in your code the myTimer.Stop(); while reading from the db, where is the myTimer.Start();?? Nassos

    GanDad

    C# database help tutorial question

  • date time format
    N NassosReyzidis

    justintimberlake wrote:

    how can i convert mm/dd/yyyy hh:mm date format to current computer date format

    string your_string_XML_Date =your_XML_Date.ToString(CultureInfo.CurrentCulture); string currentDateTime = DateTime.Now.ToString(CultureInfo.CurrentCulture); `Hope that helped Nassos GanDad `

    C# regex xml question

  • Registry Problems NullException
    N NassosReyzidis

    Hello Steven, either the RemoteKey is null or the "RemoteKey.OpenSubKey("SOFTWARE\\Twrap\\Packages\\Completed", RegistryKeyPermissionCheck.ReadSubTree)" is null change your code from: RegistryKey RemoteKey; string RemoteComputer = LabName + "isp0001"; RemoteKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, RemoteComputer); string value = RemoteKey.OpenSubKey("SOFTWARE\\Twrap\\Packages\\Completed", RegistryKeyPermissionCheck.ReadSubTree).GetValue("1.3", 0).ToString(); to: RegistryKey RemoteKey; RegistryKey RemoteSubKey; string value; string RemoteComputer = LabName + "isp0001"; RemoteKey = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, RemoteComputer); if (RemoteKey != null) { RemoteSubKey = RemoteKey.OpenSubKey("SOFTWARE\\Twrap\\Packages\\Completed",RegistryKeyPermissionCheck.ReadSubTree); if (RemoteSubKey != null) { value = RemoteSubKey.GetValue("1.3", 0).ToString(); } } if (value != null && value.Length>0) { //The SubKey exist do your staff with the value }

    GanDad

    C# database sysadmin windows-admin help

  • Object Deletion
    N NassosReyzidis

    Scott Dorman wrote:

    This is almost always a bad idea as it ultimately ends up slowing down your application.

    I Totaly agree with you there, but since he needs (for some reason) to force the GarbageCollector to collect, this is the way.;)

    GanDad

    C# algorithms tutorial question

  • Object Deletion
    N NassosReyzidis

    Hi there, You can use the CarbageCollection static class of the framework. System.GC.Collect(); See msdn for more info http://msdn2.microsoft.com/en-us/library/system.gc.aspx[^]

    GanDad

    C# algorithms tutorial question

  • Simple array use, no looping = StackOverflowException?
    N NassosReyzidis

    Hi Cristian, The problem is here: public int[] ExampleArray { set { ExampleArray = value; } } In the Setter curly Brackets you reset the property (Same Name), so when you call concreteHasArray.ExampleArray = otherArray; you conccurently setting the ExampleAray. Solution: namespace ArrayTests { class HasArray { private int[] _ExampleArray ; //Properties Expose a private member!! public int[] ExampleArray { set { _ExampleArray = value;//Set in the private member!! } get{return _ExampleArray;}//You need this so you can call concreteHasArray.ExapleArray and return the Array. } public HasArray() { ExampleArray = new int[2] { 1, 2 }; } } class Program { static void Main(string[] args) { HasArray concreteHasArray = new HasArray(); int[] otherArray = new int[2] { 3, 4 }; concreteHasArray.ExampleArray = otherArray; } } } Hope this helps Nassos

    GanDad

    C# question data-structures

  • rich textbox
    N NassosReyzidis

    Hello treah, with the RTFControl1.SelectionStart and RTFControl1.SelectionLength will give you the start and length (int) so you can get the text! Hope that helps Nassos

    GanDad

    C#

  • Catching the Exception thrown from a property that change throu DataBinding [modified]
    N NassosReyzidis

    Hello All, i have a property in my DataClass and i bound it to a control Binding adminBind = new Binding("Checked", user, "IsAdministrator"); this.chkIsAdmin.DataBindings.Add(adminBind); this Property throw an Exception when some conditions not meet (this code is inside the set of the Property). public bool IsAdministrator { get { return Convert.ToBoolean(_Record.WL_ISADMIN.Value); } set { //If the New value is true if (value) { if (CanBeTheUserAdmin())//Check if the Garage Has Admin User { //No Admin User, This Becomes Admin _Record.WL_ISADMIN.Value = value; } else//If the Garage Has Admin User throw Exception throw new Exception("Δεν Μπορείτε να κάνετε τον Χρήστη Administrator διότι Υπαρχει ήδη Administrator για το Συνεργείο!!"); }else//If the New value is False, applying it to the user _Record.WL_ISADMIN.Value = value; } } right now when the exception is thrown the control just DON'T lose Focus, and the user get confused. How can i cath the Exception in order to show the Exception Message to the User?? Any Saggestion is most Wellcome! Nassos -- modified at 7:41 Thursday 16th November, 2006

    GanDad

    C# question wpf wcf

  • How to play a sound from my program
    N NassosReyzidis

    Hi Vasildb, put this in a static class: public static bool Play (string filename) { return PlaySound (filename, IntPtr.Zero,0x00020000 |0x0000); } /// /// Plays A sound /// /// /// /// /// [DllImport("winmm.dll", EntryPoint="PlaySound")] private static extern bool PlaySound( string szSound, IntPtr hMod, int flags ); Got it from a forum and work perfect Nassos

    GanDad

    C# tutorial csharp visual-studio help

  • How to access unmanaged function in c#
    N NassosReyzidis

    Hi there use : using System.Runtime.InteropServices; and in the class (propably a static helper class) [DllImport ("user32.dll")] public static extern long DestroyWindow (long hWnd); and from your program call : MyStaticHelper.DestroyWindow (this.Handle); Hope that helped Nassos GanDad

    C# csharp c++ help tutorial

  • sort column in ultrawingrid
    N NassosReyzidis

    Hi Frank, use ultraGrid1.DisplayLayout.Bands[0].SortedColumns.add(YourColumn col) hope that helped GanDad

    C# help tutorial question

  • Windows API(kernel)
    N NassosReyzidis

    Dear Bryan, I feel honnored by your post, but what goes around comes around, that is the beuty of software community, lets all share our knowlege. thank again for your post, Happy coding mate ;) GanDad

    C# csharp com json help

  • Windows API(kernel)
    N NassosReyzidis

    Bryan, Sorry my knowlege is limited on winAPI but i found just now a site for the proper way of the function parameters, so here it is : http://undocumented.ntinternals.net/ Under UserMode -->NTDLL-->NTObjects-->Section. Good luck dude GanDad

    C# csharp com json help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups