Beispiel #1
0
 private void DeleteGraph()
 {
     using (ThreeButtonDialog dlog = new WarningDialog(string.Format(Messages.DELETE_GRAPH_MESSAGE, GraphList.SelectedGraph.DisplayName.EscapeAmpersands()),
                                                       ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo))
     {
         if (dlog.ShowDialog(this) == DialogResult.Yes)
         {
             if (GraphList.AuthorizedRole)
             {
                 GraphList.DeleteGraph(GraphList.SelectedGraph);
                 GraphList.LoadDataSources(SaveGraphs);
             }
         }
     }
 }
Beispiel #2
0
 private void DeleteGraph()
 {
     using (ThreeButtonDialog dlog = new ThreeButtonDialog(
                new ThreeButtonDialog.Details(SystemIcons.Warning,
                                              string.Format(Messages.DELETE_GRAPH_MESSAGE, GraphList.SelectedGraph.DisplayName),
                                              Messages.XENCENTER),
                ThreeButtonDialog.ButtonYes,
                ThreeButtonDialog.ButtonNo))
     {
         if (dlog.ShowDialog(this) == DialogResult.Yes)
         {
             if (GraphList.AuthorizedRole)
             {
                 GraphList.DeleteGraph(GraphList.SelectedGraph);
                 GraphList.LoadDataSources(SaveGraphs);
             }
         }
     }
 }