示例#1
0
 public void RefreshImages()
 {
     if (ProjectManager.CurrentProject.Frames.Count > 0)
     {
         if (FrameSelectScale.Value >= 0 && FrameSelectScale.Value < ProjectManager.CurrentProject.Frames.Count &&
             ProjectManager.CurrentProject.GetThumb(FrameSelectScale.Value) != null)
         {
             ThumbEditView.Image   = WinFormHelper.ConvertToBitmap(ProjectManager.CurrentProject.GetThumbEdited((int)FrameSelectScale.Value));
             ThumbViewGraph.Image  = WinFormHelper.ConvertToBitmap(ProjectManager.CurrentProject.GetThumb((int)FrameSelectScale.Value));
             FrameSelectLabel.Text = FrameSelectScale.Value.ToString();
         }
     }
     else
     {
         ThumbEditView.Image  = null;
         ThumbViewGraph.Image = null;
         ThumbViewList.Image  = null;
     }
 }
示例#2
0
        public override WindowResponse Show()
        {
            if (DialogType == FileDialogType.SelectFolder)
            {
                fbdlg = new OpenFolderDialog();
                fbdlg.InitialFolder = InitialDirectory;
                fbdlg.Title         = Title;

                WindowResponse resp = WinFormHelper.GetResponse(fbdlg.ShowDialog(owner));
                SelectedPath = fbdlg.Folder;
                return(resp);
            }
            else
            {
                switch (DialogType)
                {
                case FileDialogType.OpenFile:
                    fdlg = new OpenFileDialog();
                    break;

                case FileDialogType.SaveFile:
                    fdlg = new SaveFileDialog();
                    break;
                }

                fdlg.InitialDirectory = InitialDirectory;
                fdlg.Title            = Title;
                string tmpFilter = string.Empty;

                foreach (FileTypeFilter filter in FileTypeFilters)
                {
                    tmpFilter += filter.FilterName + "|";
                    for (int i = 0; i < filter.Filter.Length; i++)
                    {
                        tmpFilter += (i == 0 ? "" : ";") + "*." + filter.Filter[i];
                    }
                }
                fdlg.Filter = tmpFilter;
                WindowResponse resp = WinFormHelper.GetResponse(fdlg.ShowDialog());
                SelectedPath = fdlg.FileName;
                return(resp);
            }
        }
示例#3
0
 public override WindowResponse Show(object parent, string message, string title, MessageWindowType type, MessageWindowButtons bType)
 {
     if (parent != null)
     {
         return(WinFormHelper.GetResponse(MessageBox.Show(message, title, WinFormHelper.GetButtons(bType), WinFormHelper.GetWinType(type))));
     }
     else
     {
         return(WinFormHelper.GetResponse(MessageBox.Show((IWin32Window)parent, message, title, WinFormHelper.GetButtons(bType), WinFormHelper.GetWinType(type))));
     }
 }