Esempio n. 1
0
        public void OpenWorkSpace()
        {
            if (DiscardChanges())
            {
                OpenFileDialog open = new OpenFileDialog();
                open.DefaultExt = ".scumle";
                open.Filter     = "(.scumle)|*.scumle";
                List <ModelBase> loadedModelsList = new List <ModelBase>();

                // Show open file dialog box
                bool?result = open.ShowDialog();

                // Process open file dialog box results
                if (result == true)
                {
                    LoadThread loadThread = new LoadThread(Shapes, Lines, Path.GetFullPath(open.FileName));
                    loadThread.Start();
                    Shapes.Clear();
                    Lines.Clear();
                    UndoRedo.clear();
                    UndoRedo.ChangeSinceSave = false;
                    _currentFilePath         = Path.GetFullPath(open.FileName);
                }
            }
        }
Esempio n. 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            // Create your application here
            SetContentView(Resource.Layout.loading);
            mainlayout        = (LinearLayout)FindViewById(Resource.Id.mainlayout);
            mSharedPreference = GetSharedPreferences(Constant.Com_Fra, FileCreationMode.WorldWriteable);

            lodimgsrc = mSharedPreference.GetString(Constant.Lod_Img, "");
            if (lodimgsrc != "")
            {
                Bitmap bmp = getLoacalBitmap(lodimgsrc);
                if (bmp != null)
                {
                    mainlayout.SetBackgroundDrawable(new BitmapDrawable(bmp));
                }
            }
            else
            {
            }


            mHandler.mcontext = this;

            //timeoutrunable = new Runnable(() =>
            //{
            //    isTimeout = true;
            //    Message msg = Message.Obtain();
            //    msg.What = MSG_INIT_TIMEOUT;
            //    mHandler.SendMessage(msg);


            //});
            //mHandler.PostDelayed(timeoutrunable, 60000);

            LoadThread loadthread = new LoadThread();

            loadthread.context = this;
            loadthread.Start();
        }