예제 #1
0
        private void OnImport()
        {
            SetStatus("Importing...");

            try {
                var fmt      = Person.Format.CSV;
                var fileName = "";
                var chfmt    = new ChooseConversionFormat(this);
                chfmt.Parent       = this;
                chfmt.TransientFor = this;
                chfmt.SetPosition(Gtk.WindowPosition.CenterOnParent);
                var result = (Gtk.ResponseType)chfmt.Run();

                chfmt.Hide();
                fmt      = chfmt.Format;
                fileName = chfmt.FileName;
                chfmt.Destroy();

                if (result != Gtk.ResponseType.Cancel)
                {
                    this.Import(fileName, fmt);
                }
            } catch (Exception exc)
            {
                Util.MsgError(this, AppInfo.Name, exc.Message);
            }

            this.SetStatus();
        }
예제 #2
0
        private void OnExport()
        {
            var fmt      = Person.Format.CSV;
            var fileName = "";
            var chfmt    = new ChooseConversionFormat(this);

            chfmt.Parent       = this;
            chfmt.TransientFor = this;
            chfmt.SetPosition(Gtk.WindowPosition.CenterOnParent);
            var result = (Gtk.ResponseType)chfmt.Run();

            chfmt.Hide();
            fmt      = chfmt.Format;
            fileName = chfmt.FileName;
            chfmt.Destroy();

            if (result != Gtk.ResponseType.Cancel)
            {
                Convert(fmt, fileName);
            }
        }
예제 #3
0
        private void OnImport()
        {
            SetStatus( "Importing..." );

            try {
                var fmt = Person.Format.CSV;
                var fileName = "";
                var chfmt = new ChooseConversionFormat( this );
                chfmt.Parent = this;
                chfmt.TransientFor = this;
                chfmt.SetPosition( Gtk.WindowPosition.CenterOnParent );
                var result = (Gtk.ResponseType) chfmt.Run();

                chfmt.Hide();
                fmt = chfmt.Format;
                fileName = chfmt.FileName;
                chfmt.Destroy();

                if ( result != Gtk.ResponseType.Cancel ) {
                    this.Import( fileName, fmt );
                }
            } catch(Exception exc)
            {
                Util.MsgError( this, AppInfo.Name, exc.Message );
            }

            this.SetStatus();
        }
예제 #4
0
        private void OnExport()
        {
            var fmt = Person.Format.CSV;
            var fileName = "";
            var chfmt = new ChooseConversionFormat( this );
            chfmt.Parent = this;
            chfmt.TransientFor = this;
            chfmt.SetPosition( Gtk.WindowPosition.CenterOnParent );
            var result = (Gtk.ResponseType) chfmt.Run();

            chfmt.Hide();
            fmt = chfmt.Format;
            fileName = chfmt.FileName;
            chfmt.Destroy();

            if ( result != Gtk.ResponseType.Cancel ) {
                Convert( fmt, fileName );
            }
        }