Example #1
0
 private Bitmap getIconBmp(ObjBodyList obl, Bitmap bmp)
 {
     try
     {
         using (Bitmap dest = new Bitmap(32, 32))
         {
             using (Graphics g = Graphics.FromImage(dest))
             {
                 using (Bitmap b = new Bitmap(obl.getLiplisBody(0, 1).getBody11()).Clone(new Rectangle(0, 0, obl.width, obl.width), dest.PixelFormat))
                 {
                     g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
                     g.DrawImage(b, 0, 0, 32, 32);
                     return (Bitmap)dest.Clone();
                 }
             }
         }
     }
     catch
     {
         return FctCreateFromResource.getTranse();
     }
 }
Example #2
0
        protected virtual void onDelete()
        {
            try
            {
                //まずはタイマーをとめる
                flgAlarm = 0;               //フラグ0
                timRefresh.Dispose();       //タイマーの破棄
                timUpdate.Dispose();        //タイマーの破棄

                //ボイスロイドスレッドの終了
                lvr.Dispose(); lvr = null;

                //セーブをしておく
                if(os != null)os.setPreferenceData();

                //おそうじ
                if (obr != null) obr.deleteAllTempFile();

                //アクティビティの破棄
                if (at != null) Invoke(new LpsDelegate.dlgVoidToVoid(at.dispose));
                if (li != null) Invoke(new LpsDelegate.dlgVoidToVoid(li.Dispose));
                if (at != null) Invoke(new LpsDelegate.dlgVoidToVoid(al.dispose));
                if (ac != null) Invoke(new LpsDelegate.dlgVoidToVoid(ac.dispose));
                if (ast != null) Invoke(new LpsDelegate.dlgVoidToVoid(ast.dispose));

                //オブジェクトの破棄
                os = null;
                oss = null;
                ossList = null;
                obl = null;
                olc = null;
                owf.Dispose(); owf = null;
                obr = null;

                //最後に自分自身の終了
                if (!flgRestart)
                {
                    flgEnd = true;
                    Invoke(new LpsDelegate.dlgVoidToVoid(this.Close));
                }
                else
                {
                    Invoke(new LpsDelegate.dlgVoidToVoid(restert));
                }
            }
            catch(Exception err)
            {
                LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, err.ToString());
                if (!flgRestart)
                {
                    flgEnd = true;
                }
                else
                {

                }
            }
        }
Example #3
0
        protected virtual void initObject()
        {
            //バッテリーオブジェクト
            ps = SystemInformation.PowerStatus;

            //設定ファイルの読み込み
            os = new ObjSetting();

            //スキンファイルの読み込み
            ossList = new ObjSkinSettingList();

            //対象スキンの取得
            oss = ossList.loadTargetSkin(os.loadSkin);

            //ボディリストの初期化
            obl = new ObjBodyList(os.loadSkin);

            //ボディを初期化しておく
            ob = obl.getLiplisBody(0, 0);

            //チャットファイルの読み込み
            olc = new ObjLiplisChat(os.loadSkin);

            //2014/05/29 ver4.0.0 タッチ定義の追加
            olt = new ObjLiplisTouch(os.loadSkin);

            //ウインドウファイルの初期化
            owf = new ObjWindowFile(os.loadSkin);

            //アイコンクラスの初期化
            li = new LiplisIcon(this);

            //リプリスタスクバー
            ltb = new LiplisTaskBar(this);

            //ほうきオブジェクトの初期化
            obr = new ObjBroom();

            ///2014/04/20 Liplis4.0 総合エモーション追加
            //総合エモーション
            sumEmotion = new MsgEmotion();

            //アイコンクラスを連動登録
            this.AddOwnedForm(li);
        }
        private void initDataPanel()
        {
            ObjBodyList obl = new ObjBodyList(oss.charName);

            //初期化
            this.lblText = new System.Windows.Forms.Label();
            this.lnkLbl = new System.Windows.Forms.Label();
            this.pic = new CusCtlPictureBox();
            this.btnUpdate = new System.Windows.Forms.Button();

            //
            // panel
            //
            this.Controls.Add(this.btnUpdate);
            this.Controls.Add(this.lblText);
            this.Controls.Add(this.lnkLbl);
            this.Controls.Add(this.pic);

            this.Location = new System.Drawing.Point(3, 3);
            this.Name = "panel";
            this.Size = new System.Drawing.Size(380, 80);
            this.TabIndex = 0;
            this.MouseEnter += new System.EventHandler(this.mouseEnter);
            this.MouseLeave += new System.EventHandler(this.mouseLeave);

            this.BackColor = Color.Azure;

            //
            // lnkLbl
            //
            this.lnkLbl.Location = new System.Drawing.Point(108, 17);
            this.lnkLbl.Font = new System.Drawing.Font("MS UI Gothic", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(128)));
            this.lnkLbl.Name = "lnkLbl";
            this.lnkLbl.Size = new System.Drawing.Size(439, 16);
            this.lnkLbl.TabIndex = 1;
            this.lnkLbl.Text = oss.charName;
            this.lnkLbl.MouseEnter += new System.EventHandler(this.mouseEnter);
            this.lnkLbl.MouseLeave += new System.EventHandler(this.mouseLeave);
            //
            // lblText
            //
            this.lblText.Location = new System.Drawing.Point(108, 33);
            this.lblText.Name = "lblText";
            this.lblText.Size = new System.Drawing.Size(454, 48);
            this.lblText.Text = oss.charIntroduction.Replace("@",Environment.NewLine);
            this.lblText.TabIndex = 2;
            this.lblText.MouseEnter += new System.EventHandler(this.mouseEnter);
            this.lblText.MouseLeave += new System.EventHandler(this.mouseLeave);
            //
            // pic
            //
            this.pic.Location = new System.Drawing.Point(2, 2);
            this.pic.Name = "pic";
            this.pic.Size = new System.Drawing.Size(75, 75);
            this.pic.TabIndex = 0;
            this.pic.TabStop = false;
            this.pic.SizeMode = PictureBoxSizeMode.Zoom;
            this.pic.MouseEnter += new System.EventHandler(this.mouseEnter);
            this.pic.MouseLeave += new System.EventHandler(this.mouseLeave);

            //
            // btnUpdate
            //
            this.btnUpdate.Location = new System.Drawing.Point(300, 5);
            this.btnUpdate.Name = "btnUpdate";
            this.btnUpdate.Size = new System.Drawing.Size(75, 23);
            this.btnUpdate.TabIndex = 0;
            this.btnUpdate.Text = "アップデート";
            this.btnUpdate.UseVisualStyleBackColor = true;
            this.btnUpdate.Enabled = false;
            this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click);

            //イメージ
            if (LpsPathControllerCus.checkFileExist(LpsPathControllerCus.getSkinPath() + oss.charName + "\\window\\icon.png"))
            {
                this.pic.Image = new Bitmap(new Bitmap(LpsPathControllerCus.getSkinPath() + oss.charName + "\\window\\icon.png"), new Size(100, 100));
            }
            else
            {
                this.pic.Image = FctCreateFromResource.getResourceBitmap(LiplisDefine.TRANSE);
            }
        }