コード例 #1
0
ファイル: SortExtensions.cs プロジェクト: xxftapv/RDCMan
 public int Compare(TreeNode treeNode1, TreeNode treeNode2)
 {
     if (_sortOrder == SortOrder.ByStatus)
     {
         ImageConstants imageConstants  = ServerTree.TranslateImage((ImageConstants)treeNode1.ImageIndex, toSelected: false);
         ImageConstants imageConstants2 = ServerTree.TranslateImage((ImageConstants)treeNode2.ImageIndex, toSelected: false);
         int            num             = imageConstants2 - imageConstants;
         if (num != 0)
         {
             return(num);
         }
     }
     return(Helpers.NaturalCompare(treeNode1.Text, treeNode2.Text));
 }
コード例 #2
0
ファイル: ImageHelper.cs プロジェクト: anthrax3/nHydrate
        public static Bitmap GetImage(ImageConstants image)
        {
            Bitmap retval = null;

            switch (image)
            {
            case ImageConstants.Default:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.Model:
                retval = GetImage("Model.png");
                break;

            case ImageConstants.Database:
                retval = GetImage("Database.png");
                break;

            case ImageConstants.Entities:
                retval = GetImage("Entities.png");
                break;

            case ImageConstants.Entity:
                retval = GetImage("Entity.png");
                break;

            case ImageConstants.Fields:
                retval = GetImage("Fields.png");
                break;

            case ImageConstants.Field:
                retval = GetImage("Field.png");
                break;

            case ImageConstants.Views:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.View:
                retval = GetImage("Default.png");
                break;
            }
            return(retval);
        }
コード例 #3
0
ファイル: ImageHelper.cs プロジェクト: mjl68/nHydrate
        public static Bitmap GetImage(ImageConstants image)
        {
            Bitmap retval = null;

            switch (image)
            {
            case ImageConstants.Default:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.Model:
                retval = GetImage("Model.png");
                break;

            case ImageConstants.Database:
                retval = GetImage("Database.png");
                break;

            case ImageConstants.Entities:
                retval = GetImage("Entities.png");
                break;

            case ImageConstants.Entity:
                retval = GetImage("Entity.png");
                break;

            case ImageConstants.Fields:
                retval = GetImage("Fields.png");
                break;

            case ImageConstants.Field:
                retval = GetImage("Field.png");
                break;

            case ImageConstants.Function:
                retval = GetImage("Function.png");
                break;

            case ImageConstants.Views:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.View:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.StoredProcs:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.StoredProc:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.Parameters:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.Parameter:
                retval = GetImage("Field.png");
                break;

            case ImageConstants.Components:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.Component:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.SelectCommands:
                retval = GetImage("Default.png");
                break;

            case ImageConstants.SelectCommand:
                retval = GetImage("Default.png");
                break;
            }
            return(retval);
        }
コード例 #4
0
 public virtual void ChangeImageIndex(ImageConstants index)
 {
     base.ImageIndex         = (int)index;
     base.SelectedImageIndex = (int)ServerTree.TranslateImage(index, true);
 }
コード例 #5
0
ファイル: ServerTree.cs プロジェクト: xxftapv/RDCMan
 public static ImageConstants TranslateImage(ImageConstants index, bool toSelected)
 {
     return(ImageConstantLookup[toSelected ? 1 : 0, (int)index]);
 }
コード例 #6
0
ファイル: ImageHelper.cs プロジェクト: nHydrate/nHydrate
		public static Bitmap GetImage(ImageConstants image)
		{
			Bitmap retval = null;
			switch(image)
			{
				case ImageConstants.Default:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.Model:
					retval = GetImage("Model.png");
					break;
				case ImageConstants.Database:
					retval = GetImage("Database.png");
					break;
				case ImageConstants.Entities:
					retval = GetImage("Entities.png");
					break;
				case ImageConstants.Entity:
					retval = GetImage("Entity.png");
					break;
				case ImageConstants.Fields:
					retval = GetImage("Fields.png");
					break;
				case ImageConstants.Field:
					retval = GetImage("Field.png");
					break;
				case ImageConstants.Function:
					retval = GetImage("Function.png");
					break;
				case ImageConstants.Views:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.View:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.StoredProcs:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.StoredProc:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.Parameters:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.Parameter:
					retval = GetImage("Field.png");
					break;
				case ImageConstants.Components:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.Component:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.SelectCommands:
					retval = GetImage("Default.png");
					break;
				case ImageConstants.SelectCommand:
					retval = GetImage("Default.png");
					break;
			}
			return retval;
		}
コード例 #7
0
 public sealed override void ChangeImageIndex(ImageConstants index)
 {
     base.ImageIndex         = _server.ImageIndex;
     base.SelectedImageIndex = _server.SelectedImageIndex;
 }