Exemplo n.º 1
0
 public frmSINnerGroupSearch(CharacterExtended ce, ucSINnersBasic parentBasic)
 {
     MyCE         = ce;
     MyParentForm = parentBasic;
     InitializeComponent();
     this.siNnerGroupSearch1.MyCE         = ce;
     this.siNnerGroupSearch1.MyParentForm = this;
 }
Exemplo n.º 2
0
 public frmSINnerGroupSearch(CharacterExtended ce, ucSINnersBasic parentBasic)
 {
     MyCE         = ce;
     MyParentForm = parentBasic;
     InitializeComponent();
     siNnerGroupSearch1.MyCE         = ce;
     siNnerGroupSearch1.MyParentForm = this;
     VisibleChanged += (sender, args) =>
     {
         if (Visible)
         {
             ReallyCenterToScreen();
         }
     };
 }
Exemplo n.º 3
0
        public async Task <CharacterExtended> SetCharacterFrom(CharacterShared mySINner)
        {
            InitializeComponent();
            _mySINner = mySINner;
            //if (PluginHandler.MyCharExtendedDic.ContainsKey(mySINner.CharacterObject.FileName))
            //{
            //    CharacterExtended outce;
            //    if (!PluginHandler.MyCharExtendedDic.TryGetValue(mySINner.CharacterObject.FileName, out outce))
            //    {
            //        throw new ArgumentException("Could not get character from MyCharExtendedDic", nameof(mySINner));
            //    }

            //    MyCE = outce;
            //}
            //else
            //{
            MyCE             = new CharacterExtended(mySINner.CharacterObject, null, PluginHandler.MySINnerLoading);
            MyCE.ZipFilePath = await MyCE.PrepareModel();

            //}
            MyCE.MySINnerFile.SiNnerMetaData.Tags = MyCE.PopulateTags();

            TabSINnersBasic = new ucSINnersBasic(this)
            {
                Visible = true
            };
            TabSINnersAdvanced = new ucSINnersAdvanced(this)
            {
                Visible = true
            };


            this.tabPageBasic.Controls.Add(TabSINnersBasic);
            this.tabPageAdvanced.Controls.Add(TabSINnersAdvanced);

            this.AutoSize = true;

            return(MyCE);
        }
Exemplo n.º 4
0
        public async Task <CharacterExtended> SetCharacterFrom(CharacterShared mySINner)
        {
            InitializeComponent();
            _mySINner        = mySINner;
            MyCE             = new CharacterExtended(mySINner.CharacterObject, null, PluginHandler.MySINnerLoading);
            MyCE.ZipFilePath = await MyCE.PrepareModel();

            MyCE.MySINnerFile.SiNnerMetaData.Tags = MyCE.PopulateTags();

            TabSINnersBasic = new ucSINnersBasic(this)
            {
                Visible = true
            };
            TabSINnersAdvanced = new ucSINnersAdvanced(this)
            {
                Visible = true
            };


            this.tabPageBasic.Controls.Add(TabSINnersBasic);
            this.tabPageAdvanced.Controls.Add(TabSINnersAdvanced);

            this.AutoSize = true;

            if ((ucSINnersOptions.UploadOnSave == true))
            {
                try
                {
                    mySINner.CharacterObject.OnSaveCompleted  = null;
                    mySINner.CharacterObject.OnSaveCompleted += PluginHandler.MyOnSaveUpload;
                }
                catch (Exception e)
                {
                    System.Diagnostics.Trace.TraceInformation(e.ToString());
                }
            }
            return(MyCE);
        }
Exemplo n.º 5
0
        public async Task <CharacterExtended> SetCharacterFrom(CharacterShared mySINner)
        {
            InitializeComponent();
            _mySINner        = mySINner ?? throw new ArgumentNullException(nameof(mySINner));
            MyCE             = new CharacterExtended(mySINner.CharacterObject, PluginHandler.MySINnerLoading);
            MyCE.ZipFilePath = await MyCE.PrepareModelAsync();

            TabSINnersBasic = new ucSINnersBasic(this)
            {
                Visible = true
            };
            TabSINnersAdvanced = new ucSINnersAdvanced(this)
            {
                Visible = true
            };


            tabPageBasic.Controls.Add(TabSINnersBasic);
            tabPageAdvanced.Controls.Add(TabSINnersAdvanced);
            AutoSize = true;

            if (ucSINnersOptions.UploadOnSave)
            {
                try
                {
                    if (await mySINner.CharacterObject.DoOnSaveCompletedAsync.RemoveAsync(PluginHandler.MyOnSaveUpload))
                    {
                        await mySINner.CharacterObject.DoOnSaveCompletedAsync.AddAsync(PluginHandler.MyOnSaveUpload);
                    }
                }
                catch (Exception e)
                {
                    Log.Warn(e);
                }
            }
            //MyCE.MySINnerFile.SiNnerMetaData.Tags = MyCE.PopulateTags();
            return(MyCE);
        }