Ejemplo n.º 1
0
        private void XMLButtonCallback(ButtonWidget button, SpoolerMessage message, PopupMessageBox parentFrame, XMLFrame childFrame, object data)
        {
            var childElement = (ButtonWidget)childFrame.FindChildElement(301);

            if (button.ID == 301)
            {
                return;
            }

            settings.Settings.miscSettings.FileAssociations.ShowFileAssociationsDialog = !childElement.Checked;
            switch (button.ID)
            {
            case 101:
                FileAssociations.Set3DFileAssociation(".stl", "STL_M3D_Printer_GUI_file", ExecutablePath, "M3D file (.stl)", IconPath);
                FileAssociations.Set3DFileAssociation(".obj", "OBJ_M3D_Printer_GUI_file", ExecutablePath, "M3D file (.obj)", IconPath);
                break;

            case 102:
                FileAssociations.Delete3DFileAssociation(".stl", "STL_M3D_Printer_GUI_file");
                FileAssociations.Delete3DFileAssociation(".obj", "OBJ_M3D_Printer_GUI_file");
                break;
            }
            parentFrame.AllowMessages = allow_messages;
            parentFrame.CloseCurrent();
        }
Ejemplo n.º 2
0
 private static void XMLButtonCallback(ButtonWidget button, SpoolerMessage message, PopupMessageBox parentFrame, XMLFrame childFrame, object data)
 {
     parentFrame.CloseCurrent();
 }