Example #1
0
        public ConfigTemplate(String configFile) : this()
        {
            //bind
            DataContext = this;
            //load configration
            if (!string.IsNullOrEmpty(configFile))
            {
                config = ProjectConfigration.readSettingFromFile(configFile);

                SettingFile = configFile;

                KeystoreFilePath = config.KeystoreFilePath;
                KeyStorePw       = config.KeystorePassword;
                Alias            = config.Alias;
                AliasPw          = config.AliasPassword;

                foreach (string item in config.Candinate)
                {
                    Candinate.Add(new EditItem(item, EditState.Normal));
                }
            }
            else
            {
                config = new ProjectConfigration();
            }

            Candinate.Add(new EditItem("", EditState.Editable));
            Channels.ItemsSource = Candinate;

            LoadTemplate();
        }
Example #2
0
 public Builder(ProjectConfigration config, String applicationName, BackgroundWorker bw, DoWorkEventArgs e)
     : this()
 {
     Config          = config;
     ApplicationName = applicationName;
     monitor         = bw;
     result          = e;
 }
        private void LoadConfigration()
        {
            if (CandinateConfigrationFiles.Count > 0)
            {
                CandinateConfigrationFiles.Clear();
            }

            string[] files = ProjectConfigration.GetConfigFileList();
            if (files != null)
            {
                foreach (string file in files)
                {
                    CandinateConfigrationFiles.Add(file);
                }
            }

            this.settingList.ItemsSource = CandinateConfigrationFiles;
        }
Example #4
0
        public void LoadTemplate()
        {
            var t = ProjectConfigration.GetTemplate();

            foreach (var item in t)
            {
                ChannelTemplate.Add(new TemplateItem(item["id"], item["name"], false));
            }

            var coincide = from A in ChannelTemplate
                           from B in Candinate
                           where A.isSameChannel(B.ItemName)
                           select A;

            foreach (ChannelItem item in coincide)
            {
                (item as TemplateItem).IsChecked = true;
            }

            this.lb_template.ItemsSource = ChannelTemplate;
        }
        private void BindList()
        {
            if (mSelectedConfigIndex < 0 || mSelectedConfigIndex >= CandinateConfigrationFiles.Count)
            {
                mSelectedConfigIndex = 0;
            }

            this.settingList.SelectedIndex = mSelectedConfigIndex;

            if (CandinateConfigrationFiles.Count > 0)
            {
                var config = ProjectConfigration.readSettingFromFile(CandinateConfigrationFiles[mSelectedConfigIndex]);

                AvailabelChannels.Clear();

                foreach (string item in config.Candinate)
                {
                    AvailabelChannels.Add(new ShowItem(item, 0));
                }
            }

            this.Channels.ItemsSource = AvailabelChannels;
        }
 public ProjectConfigration GetConfigure()
 {
     return(ProjectConfigration.readSettingFromFile(mConfigFile));
 }
Example #7
0
 public Worker setConfigure(ProjectConfigration c)
 {
     config = c;
     return(this);
 }
 public SourceBuilder(ProjectConfigration config, String projectName, String sourceFolder, BackgroundWorker workReporter)
     : base(config, projectName, workReporter)
 {
     projectStruct = new ProjectStruct(sourceFolder);
 }
 public ApkBuilder(ProjectConfigration config, DecodedApkStruct das, BackgroundWorker monitor) : base(config, das.AppName, monitor)
 {
     ApkFolderStruct = das;
 }
Example #10
0
 public Builder(ProjectConfigration config, String applicationName, BackgroundWorker bw) : this()
 {
     Config          = config;
     ApplicationName = applicationName;
     monitor         = bw;
 }
Example #11
0
 public AXMLBuilder(ProjectConfigration config, string apk, BackgroundWorker monitor, DoWorkEventArgs e) : base(config, apk.ToFileName(), monitor, e)
 {
     mPathToApk = apk;
 }
 public Worker(ProjectConfigration c, System.ComponentModel.BackgroundWorker bw, DoWorkEventArgs e)
 {
     config  = c;
     monitor = bw;
     result  = e;
 }
 public static Worker getInstance(ProjectConfigration c, System.ComponentModel.BackgroundWorker bw, DoWorkEventArgs e)
 {
     return(new Worker(c, bw, e));
 }