コード例 #1
0
ファイル: PluginBase.cs プロジェクト: jiailiuyan/Gum
 public void CallDeleteOptionsWindowShow(DeleteOptionsWindow optionsWindow, object objectToDelete)
 {
     if (DeleteOptionsWindowShow != null)
     {
         DeleteOptionsWindowShow(optionsWindow, objectToDelete);
     }
 }
コード例 #2
0
ファイル: PluginBase.cs プロジェクト: jiailiuyan/Gum
 public void CallDeleteConfirm(DeleteOptionsWindow optionsWindow, object deletedObject)
 {
     if (DeleteConfirm != null)
     {
         DeleteConfirm(optionsWindow, deletedObject);
     }
 }
コード例 #3
0
ファイル: PluginManager.cs プロジェクト: jiailiuyan/Gum
 internal void DeleteConfirm(DeleteOptionsWindow window, object objectToDelete)
 {
     CallMethodOnPlugin(
         delegate(PluginBase plugin)
         {
             plugin.CallDeleteConfirm(window, objectToDelete);
         },
         "ConfirmDelete"
         );
 }
コード例 #4
0
ファイル: PluginManager.cs プロジェクト: jiailiuyan/Gum
        internal void ShowDeleteDialog(DeleteOptionsWindow window, object objectToDelete)
        {
            CallMethodOnPlugin(
                delegate(PluginBase plugin)
                {
                    plugin.CallDeleteOptionsWindowShow(window, objectToDelete);

                },
                "ShowDeleteDialog"
                );
        }
コード例 #5
0
        DialogResult ShowDeleteDialog(object objectToDelete, out DeleteOptionsWindow optionsWindow)
        {
            string titleText;
            if (objectToDelete is ComponentSave)
            {
                titleText = "Delete Component?";
            }
            else if (objectToDelete is ScreenSave)
            {
                titleText = "Delete Screen?";
            }
            else if (objectToDelete is InstanceSave)
            {
                titleText = "Delete Instance?";
            }
            else
            {
                titleText = "Delete?";
            }

            optionsWindow = new DeleteOptionsWindow();
            optionsWindow.Text = titleText;
            optionsWindow.Message = "Are you sure you want to delete:\n" + objectToDelete.ToString();
            optionsWindow.ObjectToDelete = objectToDelete;

            PluginManager.Self.ShowDeleteDialog(optionsWindow, objectToDelete);

            DialogResult result = optionsWindow.ShowDialog();

            return result;
        }