예제 #1
0
 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
        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
        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
 public static ImageConstants TranslateImage(ImageConstants index, bool toSelected)
 {
     return(ImageConstantLookup[toSelected ? 1 : 0, (int)index]);
 }
예제 #6
0
		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;
 }