Ejemplo n.º 1
0
 internal ExcelWorksheet(string name, ExcelWorksheetCollection parent)
 {
     this.defaultColumnWidth = 2340;
     this.pageBreakViewZoom  = 60;
     this.zoom                      = 100;
     this.windowOptions             = WorksheetWindowOptions.DefaultGridLineColor | WorksheetWindowOptions.ShowGridLines | WorksheetWindowOptions.ShowOutlineSymbols | WorksheetWindowOptions.ShowSheetHeaders | WorksheetWindowOptions.ShowZeroValues;
     this.paperSize                 = 0;
     this.scalingFactor             = 100;
     this.startPageNumber           = 1;
     this.fitWorksheetWidthToPages  = 0;
     this.fitWorksheetHeightToPages = 0;
     this.setupOptions              = SetupOptions.Portrait;
     this.printResolution           = 0;
     this.verticalPrintResolution   = 0;
     this.headerMargin              = 0.5;
     this.footerMargin              = 0.5;
     this.numberOfCopies            = 1;
     this.WSBoolOpt                 = WSBoolOptions.ColGroupRight | WSBoolOptions.RowGroupBelow | WSBoolOptions.ShowAutoBreaks | WSBoolOptions.ShowColumnOutline | WSBoolOptions.ShowRowOutline;
     this.name                      = name;
     this.parent                    = parent;
     this.rows                      = new ExcelRowCollection(this);
     this.columns                   = new ExcelColumnCollection(this);
     this.mergedRanges              = new MergedCellRanges(this);
     this.horizontalPageBreaks      = new HorizontalPageBreakCollection();
     this.verticalPageBreaks        = new VerticalPageBreakCollection();
     this.pictures                  = new ExcelPictureCollection(this);
     this.shapes                    = new ExcelShapeCollection(this);
     this.printOptions              = new ExcelPrintOptions(this);
     this.viewOptions               = new ExcelViewOptions(this);
 }
Ejemplo n.º 2
0
 public BuildMains(WIXSharpProject project)
 {
     SignInstaller = project.GetSignInstaller();
     Options       = project.GetOptions();
     bootstrapper  = new BuildBootstrapperCode(project);
     AppInfo       = project.GetApplication();
 }
Ejemplo n.º 3
0
        public static SetupOptions GetOptions()
        {
            _logger.Trace($"Start GetOptions RefreshNeeded = {RefreshNeeded}");
            var xs = new XmlSerializer(typeof(SetupOptions));

            if (_options == null || RefreshNeeded)
            {
                _logger.Info("Read current options from file");
                try
                {
                    using (var sr = new StreamReader(@".\SetupOptions.xml"))
                    {
                        _options = (SetupOptions)xs.Deserialize(sr);
                        _logger.Info(
                            @"Read successfully from file .\SetupOptions.xml");
                    }
                }
                catch (Exception ex)
                {
                    _logger.Error("During getting Setup options error thrown");
                    _logger.Error(ex.Message);
                    _logger.Error(ex.StackTrace);
                    SetDefaultOptions();
                }
            }
            RefreshNeeded = false;
            _logger.Trace("End GetOptions");
            return(_options);
        }
Ejemplo n.º 4
0
 public BuildMains(SigningInfo signinstaller, SetupOptions options, BuildBootstrapperCode bootstrap, ApplicationInfo appinfo)
 {
     SignInstaller = signinstaller;
     Options       = options;
     bootstrapper  = bootstrap;
     AppInfo       = appinfo;
 }
Ejemplo n.º 5
0
        public static void SaveOptions(SetupOptions options)
        {
            _logger.Trace("Start SaveOptions");
            var xs = new XmlSerializer(typeof(SetupOptions));

            try
            {
                TextWriter tw = new StreamWriter(@".\SetupOptions.xml");
                xs.Serialize(tw,
                             options);
            }
            catch (Exception ex)
            {
                _logger.Error("During saving Setup options error thrown");
                _logger.Error(ex.Message);
                _logger.Error(ex.StackTrace);
                SetDefaultOptions();
            }
            finally
            {
                RefreshNeeded = false;
                _options      = options;
            }
            _logger.Trace("End SaveOptions");
        }
Ejemplo n.º 6
0
        public Map(SetupOptions setupOptions, IOutputWrite write, IStarTrekKGSettings config, FactionName defaultHostile = null)
        {
            this.Config = config;
            this.Write  = write;

            this.DefaultHostile = defaultHostile ?? FactionName.Klingon;

            this.Initialize(setupOptions);
        }
Ejemplo n.º 7
0
        public async Task StartSetupAsync(SetupOptions options)
        {
            var ctx = new SetupContext {
                RootPassword    = options.AdminPassword,
                DbName          = options.DbName,
                EnabledFeatures = options.EnabledFeatures,
                IsDemo          = options.IsDemo,
            };

            await _setupService.SetupAsync(ctx);
        }
Ejemplo n.º 8
0
 internal ExcelWorksheet(string name, ExcelWorksheetCollection parent, ExcelWorksheet sourceWorksheet)
 {
     this.defaultColumnWidth = 2340;
     this.pageBreakViewZoom  = 60;
     this.zoom                      = 100;
     this.windowOptions             = WorksheetWindowOptions.DefaultGridLineColor | WorksheetWindowOptions.ShowGridLines | WorksheetWindowOptions.ShowOutlineSymbols | WorksheetWindowOptions.ShowSheetHeaders | WorksheetWindowOptions.ShowZeroValues;
     this.paperSize                 = 0;
     this.scalingFactor             = 100;
     this.startPageNumber           = 1;
     this.fitWorksheetWidthToPages  = 0;
     this.fitWorksheetHeightToPages = 0;
     this.setupOptions              = SetupOptions.Portrait;
     this.printResolution           = 0;
     this.verticalPrintResolution   = 0;
     this.headerMargin              = 0.5;
     this.footerMargin              = 0.5;
     this.numberOfCopies            = 1;
     this.WSBoolOpt                 = WSBoolOptions.ColGroupRight | WSBoolOptions.RowGroupBelow | WSBoolOptions.ShowAutoBreaks | WSBoolOptions.ShowColumnOutline | WSBoolOptions.ShowRowOutline;
     this.name                      = name;
     this.parent                    = parent;
     this.protectedWorksheet        = sourceWorksheet.protectedWorksheet;
     this.rows                      = new ExcelRowCollection(this, sourceWorksheet.rows);
     this.columns                   = new ExcelColumnCollection(this, sourceWorksheet.columns);
     this.defaultColumnWidth        = sourceWorksheet.defaultColumnWidth;
     this.mergedRanges              = new MergedCellRanges(this, sourceWorksheet.mergedRanges);
     this.WSBoolOpt                 = sourceWorksheet.WSBoolOpt;
     if (sourceWorksheet.PreservedWorksheetRecords != null)
     {
         this.PreservedWorksheetRecords = new PreservedRecords(sourceWorksheet.PreservedWorksheetRecords);
     }
     this.windowOptions      = sourceWorksheet.windowOptions & ~(WorksheetWindowOptions.SheetSelected | WorksheetWindowOptions.SheetVisible);
     this.firstVisibleRow    = sourceWorksheet.firstVisibleRow;
     this.firstVisibleColumn = sourceWorksheet.firstVisibleColumn;
     this.pageBreakViewZoom  = sourceWorksheet.pageBreakViewZoom;
     this.zoom = sourceWorksheet.zoom;
     this.horizontalPageBreaks      = new HorizontalPageBreakCollection(sourceWorksheet.horizontalPageBreaks);
     this.verticalPageBreaks        = new VerticalPageBreakCollection(sourceWorksheet.verticalPageBreaks);
     this.paperSize                 = sourceWorksheet.paperSize;
     this.scalingFactor             = sourceWorksheet.scalingFactor;
     this.startPageNumber           = sourceWorksheet.startPageNumber;
     this.fitWorksheetWidthToPages  = sourceWorksheet.fitWorksheetWidthToPages;
     this.fitWorksheetHeightToPages = sourceWorksheet.fitWorksheetHeightToPages;
     this.setupOptions              = sourceWorksheet.setupOptions;
     this.printResolution           = sourceWorksheet.printResolution;
     this.verticalPrintResolution   = sourceWorksheet.verticalPrintResolution;
     this.headerMargin              = sourceWorksheet.headerMargin;
     this.footerMargin              = sourceWorksheet.footerMargin;
     this.numberOfCopies            = sourceWorksheet.numberOfCopies;
     this.namedRanges               = new NamedRangeCollection(this, sourceWorksheet.NamedRanges);
     this.pictures     = new ExcelPictureCollection(this, sourceWorksheet.Pictures);
     this.shapes       = new ExcelShapeCollection(this, sourceWorksheet.Shapes);
     this.printOptions = new ExcelPrintOptions(this);
     this.viewOptions  = new ExcelViewOptions(this);
 }
        private static bool IsSetupOptionsAlreadyInTheList(SetupOptions setup_options)
        {
            foreach (SetupOptions saved_setup_options in Variables.doc_options.all_setup_options)
            {
                if (saved_setup_options.setup_name == setup_options.setup_name)
                {
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 10
0
 public WixSharpScript(WIXSharpProject project)
 {
     installdir     = project.GetInstallDir();
     Options        = project.GetOptions();
     WElements      = project.GetElements();
     Registryvalues = project.GetRegistryValues();
     projectcode    = new BuildProjectCode(Options, project.GetGlobalFileAssociations(), Registryvalues, project.GetFirewallExceptions(), project.GetSourceFiles(),
                                           project.GetCerts(), project.GetEnvironmentVars(), project.GetApplication(), project.GetUsers(), WElements, installdir, project.GetProgFiles(),
                                           project.GetProgMenu());
     buildmethods = new BuildWixBuildMethods(projectcode, project.GetFeatures());
     bootstrapper = new BuildBootstrapperCode(project.GetApplication(), Options, project.GetSignInstaller());
     mains        = new BuildMains(project.GetSignInstaller(), Options, bootstrapper, project.GetApplication());
 }
Ejemplo n.º 11
0
 private static void SetDefaultOptions()
 {
     _logger.Trace("_options set to default parameters");
     _options = new SetupOptions
     {
         CloseBrowser    = true,
         RepeatIfCrash   = true,
         Nationality     = "219", //UKRAINE code
         Password        = "******",
         PeopleCount     = "1",
         ChildCount      = "0",
         AvailabilityUrl = "http://wiknaopen.esy.es/visa/out.json",
         Email           = "*****@*****.**"
     };
 }
Ejemplo n.º 12
0
 public BuildProjectCode(WIXSharpProject project)
 {
     Options = project.GetOptions();
     GlobalFileAssociations = project.GetGlobalFileAssociations();
     Registryvalues         = project.GetRegistryValues();
     FireExcept             = project.GetFirewallExceptions();
     Sourcefiles            = project.GetSourceFiles();
     Certs = project.GetCerts();
     EnvironmentVariables = project.GetEnvironmentVars();
     application          = project.GetApplication();
     users      = project.GetUsers();
     WElements  = project.GetElements();
     installdir = project.GetInstallDir();
     progfiles  = project.GetProgFiles();
     progmenu   = project.GetProgMenu();
 }
Ejemplo n.º 13
0
 public BuildProjectCode(SetupOptions options, FileAssociations fileassoc, RegistryValues registryvalues, FirewallExceptions firewallexceptions, SourceFiles sourcefiles,
                         Certificates certs, EnvironmentVars envirvars, ApplicationInfo app, Users user, Elements elements, string dir, string files, string menu)
 {
     Options = options;
     GlobalFileAssociations = fileassoc;
     Registryvalues         = registryvalues;
     FireExcept             = firewallexceptions;
     Sourcefiles            = sourcefiles;
     Certs = certs;
     EnvironmentVariables = envirvars;
     application          = app;
     users      = user;
     WElements  = elements;
     installdir = dir;
     progfiles  = files;
     progmenu   = menu;
     addglobalfileassociations();
 }
Ejemplo n.º 14
0
        public static string GetCustomActions(SetupOptions Options)
        {
            string line = "";

            if (Options.GetCustomActions())
            {
                line += $"{Environment.NewLine}public class CustomActions {Environment.NewLine}{{ {Environment.NewLine} \t";
                if (Options.GetOptionalDesktopShortcut())
                {
                    line += $"[CustomAction] {Environment.NewLine} public static ActionResult DesktopShortcut(Session session){Environment.NewLine} {{ {Environment.NewLine}\t";
                    line += $" if (DialogResult.Yes == MessageBox.Show(\"Do you want to install desktop shortcut\", \"Installation\", MessageBoxButtons.YesNo)) {Environment.NewLine}\tsession[\"INSTALLDESKTOPSHORTCUT\"] = \"yes\"; {Environment.NewLine} \t return ActionResult.Success; {Environment.NewLine} }} {Environment.NewLine}";
                }
                if (Options.GetPromptReboot())
                {
                    line += $"[CustomAction]{Environment.NewLine}  public static ActionResult PromptToReboot(Session session){Environment.NewLine}    {{ {Environment.NewLine}\t";
                    line += $"if (DialogResult.Yes == MessageBox.Show(\"You need to reboot the system. Do you want to reboot now?\", \"ReboolTest\", MessageBoxButtons.YesNo))";
                    line += $"{Environment.NewLine} {{ {Environment.NewLine} \tProcess.Start(\"shutdown.exe\", \"-r -t 30 -c \\\"Reboot has been requested from RebootTest.msi\\\"\");";
                    line += $"{Environment.NewLine} }} {Environment.NewLine} \treturn ActionResult.Success; }}";
                }
                line += $"}} {Environment.NewLine}";
            }
            return(line);
        }
Ejemplo n.º 15
0
        public void Initialize(SetupOptions setupOptions)
        {
            this.GameConfig = setupOptions;

            if (setupOptions != null)
            {
                if (setupOptions.Initialize)
                {
                    if (setupOptions.SectorDefs == null)
                    {
                        //todo: then use appConfigSectorDefs
                        throw new GameConfigException(this.Config.GetSetting <string>("NoSectorDefsSetUp"));
                    }

                    this.Initialize(setupOptions.SectorDefs, setupOptions.AddNebulae); //Playership is set up here.
                }

                //if (setupOptions.GenerateMap)
                //{
                //    //this.Regions.PopulateSectors(setupOptions.SectorDefs, this);
                //}
            }
        }
Ejemplo n.º 16
0
        public static string GetUsings(SetupOptions Options, Elements WElements, RegistryValues Registryvalues)
        {
            string line = $"using System;{Environment.NewLine}using WixSharp;{Environment.NewLine}";

            line += $"using WixSharp.CommonTasks;{Environment.NewLine}using WixSharp.Bootstrapper; {Environment.NewLine}";
            if (Options.GetCustomActions())
            {
                line += $"using Microsoft.Deployment.WindowsInstaller; {Environment.NewLine}using System.Windows.Forms;";
            }
            if (WElements.Count > 0)
            {
                line += $"using System.Linq;{Environment.NewLine}using System.Xml;{Environment.NewLine}using System.Xml.Linq; ";
            }
            if (Registryvalues.Count > 0)
            {
                line += $"{Environment.NewLine}using Microsoft.Win32;";
            }
            if (Options.GetPromptReboot())
            {
                line += $"{Environment.NewLine}using System.Diagnostics;";
            }
            line += $"{Environment.NewLine}";
            return(line);
        }
Ejemplo n.º 17
0
        private void simpleButton1_Click(object sender,
                                         EventArgs e)
        {
            _logger.Trace("Start simpleButton1_Click");
            var options = new SetupOptions
            {
                CloseBrowser    = toggleSwitchCloseBrowser.IsOn,
                RepeatIfCrash   = toggleSwitchRepeatIfCrash.IsOn,
                Nationality     = lookUpEditNationality.EditValue.ConvertToStringOrNull(),
                Password        = textEditPassword.Text,
                PeopleCount     = spinEditPeopleCount.EditValue.ConvertToStringOrNull(),
                ChildCount      = spinEditChildCount.EditValue.ConvertToStringOrNull(),
                AvailabilityUrl = textEditUrl.EditValue.ConvertToStringOrNull(),
                Email           = textEditEmail.EditValue.ConvertToStringOrNull(),
                Proxies         = ToStringList(listBoxControlProxies.SelectedItems),
                RuCaptchaKey    = textEditRuCaptchaID.EditValue.ConvertToStringOrNull(),
                CheckForUpdates = (bool)toggleSwitchCheckForUpdates.EditValue,
                AutoUpdates     = (bool)toggleSwitchAutoUpdate.EditValue,
            };

            SetupManager.SaveOptions(options);
            Close();
            _logger.Trace("End simpleButton1_Click");
        }
Ejemplo n.º 18
0
 public BuildBootstrapperCode(ApplicationInfo app, SetupOptions options, SigningInfo sinstaller)
 {
     application   = app;
     Options       = options;
     SignInstaller = sinstaller;
 }
Ejemplo n.º 19
0
        protected void GetSandwormOptions(IGH_DataAccess DA, int optionsIndex, int framesIndex, int blurIndex)
        {
            // Loads standard options provided by the setup component
            options = new SetupOptions();
            DA.GetData <SetupOptions>(optionsIndex, ref options);

            if (options.SensorElevation != 0)
            {
                sensorElevation = options.SensorElevation;
            }
            if (options.LeftColumns != 0)
            {
                leftColumns = options.LeftColumns;
            }
            if (options.RightColumns != 0)
            {
                rightColumns = options.RightColumns;
            }
            if (options.TopRows != 0)
            {
                topRows = options.TopRows;
            }
            if (options.BottomRows != 0)
            {
                bottomRows = options.BottomRows;
            }
            if (options.TickRate != 0)
            {
                tickRate = options.TickRate;
            }
            if (options.KeepFrames != 0)
            {
                keepFrames = options.KeepFrames;
            }
            if (options.ElevationArray != null && options.ElevationArray.Length != 0)
            {
                elevationArray = options.ElevationArray;
            }
            else
            {
                elevationArray = new double[0];
            }

            // Pick the correct multiplier based on the drawing units. Shouldn't be a class variable; gets 'stuck'.
            unitsMultiplier  = Core.ConvertDrawingUnits(RhinoDoc.ActiveDoc.ModelUnitSystem);
            sensorElevation /= unitsMultiplier; // Standardise to mm to match sensor units

            // Technically not provided by setup; but common to all Kinect-accessing components
            if (framesIndex > 0)
            {
                DA.GetData(framesIndex, ref averageFrames);
                // Make sure there is at least one frame in the render buffer
                averageFrames = averageFrames < 1 ? 1 : averageFrames;
            }
            if (blurIndex > 0)
            {
                DA.GetData(blurIndex, ref blurRadius);
            }

            depthPixelSize = Core.GetDepthPixelSpacing(sensorElevation);
        }
Ejemplo n.º 20
0
 public BuildBootstrapperCode(WIXSharpProject project)
 {
     application   = project.GetApplication();
     Options       = project.GetOptions();
     SignInstaller = project.GetSignInstaller();
 }
 public MinecraftServerSetup(SetupOptions options)
 {
     fileTransactions = new FileTransactionScheduler();
     Options          = options;
 }