Giter VIP home page Giter VIP logo

gemini's People

Contributors

4ux-nbix avatar crowbar27 avatar diluculo avatar echterago avatar florenzetti avatar gmich avatar greenboxal avatar insanekitty avatar jetelain avatar jie2gg avatar kornman00 avatar krisjanssen avatar luuksommers avatar lymims avatar mikirasora avatar nesterenko-kv avatar oldno7 avatar reminoer avatar ryanvs avatar sblkr avatar simie avatar tgjones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gemini's Issues

IShell to expose list of opened documents (and possible tools)

It would be good to get access to list of currently opened documents. I could cast IShell to IParent, but that is bad, because it is assumption on implementation of IShell, it would be much better if either IShell be derived from IParent or expose property ICollection Documents or even both.

PS: Awesome framework! It's really a time saver...

ToolboxItem Icon

I noticed that the Sigma Icon is the default icon for all ToolboxItems and there is an IconSource URI property in the ToolboxItemViewModel class. Is there a way to set the Icon for ToolboxItems instead of using the default?

How to Show (Login) Window before MainWindow display

Hi, Tgjones:

Our group want to make a program looks like "Photoshop" with some 3d render functions. So we find Gemini is our best choice.

But when I try to show a (Login) window, or config window before MainWindow start, I met some difficulty. I found the IWindow interface, and what to do something, but all my attempts failed over the past 12 hours!

I konw it's a simple function, but maybe I gone the wrong way. Could you please help me? Thanks a lot.

Consider exposing menu items and toolbar buttons using [Export] attributes

The Visual Studio approach is described here:
http://dotneteers.net/blogs/divedeeper/archive/2008/02/22/LearnVSXNowPart13.aspx

I don't propose anything nearly as complicated as the VS approach, but I do like the idea of exposing menu items, and toolbar buttons through MEF Export attributes, to be pulled in by the MainMenu and ToolBar modules, instead of "pushing" menu items using MainMenu.Add, etc.

It would also make it easier to completely disable the MainMenu and ToolBar modules.

(VS has the concept of commands - as I understand it, a single command can be bound to both a menu item and a toolbar button, which nicely centralises the command handler. I think we already have a lot of these advantages just by using WPF / Caliburn Micro, but it's an idea.)

Any thoughts?

OpenDocumentResult to call OnCompleted immediately, not on deactivation of document

My problem is that currently I could not execute any action on the opened document.
For example, I open document, than I would like to load document from file and after that I'd like to parse the file content with parser (to make custom highlight).

But action execution just "hangs" on the line "yield return Show.Document(document);" - that is because OpenDocumentResult threats action completion as moment when user closes the tab.

I understand justification of such behavior for showing modal dialogs, where after showing a dialog, if result of the dialog was successful, another operation may need to be run, but operations of opening textual files does not need such behavior.

So, it would be nice to have, at least, an option - if after activating the document result is completed or it shall wait on document deactivation.

get notified when property changes

hi all!
In my viewModel I've added this property:

private Point3D _timeOfDay;
[DisplayName("Time Of The Day"), Description("Sunrise, Current Time, Sunset")]
public Point3D TimeOfDay
{
    get { return _timeOfDay; }
    set
    {
        _timeOfDay = value;
        NotifyOfPropertyChange(() => TimeOfDay);
    }
}

and I need to be notified in my cs code when the TimeOfDay property is changed by the inspector...
how can I do this?

I've tried to do this:

DataContext = new HomeViewModel();
((HomeViewModel)DataContext).PropertyChanged +=HomeView_PropertyChanged;

but doesn't work...
thanks in advance

Beta builds, please

It would be really helpful to have beta Gemini packages available in NuGet after merging a pull request or after some significant changes to the source code. This way developers will be able to leverage NuGet package update in their projects right after they contribute to Gemini.

Enable localisation of menus

Hi,

I recently stumbled over this project and I like it very much. Thank you for your work.

However, I have some problems, because I need to localise my application. In order to do so, it would be great if the name of a menu item was independent from its text. I do not know whether the name "-" in MenuItemBase is required, but if not, something like this would be great:

In MenuItemBase:

private string name;
public virtual string Name {
    get {
        return this._name;
    }
    set {
        this.name = value;
        this.NotifyOfPropertyChange(() => this.Name);
    }
}

In StandardMenuItem:

public override string Name {
    get {
        return base.Name ?? (string.IsNullOrEmpty(Text) ? null : Text.Replace("_", string.Empty));
    }
}

This implementation would break anything that relies on the default name being "-", but would be compatible in all other cases and enable setting localised captions for the menu items.

Gentle push (or a shove) in the right direction needed.

I'm trying to use this framework, but would like to use a Ribbon (i.e. http://fluent.codeplex.com/ or equivalent) instead of the built in Menu/Toolbar. They require inheritance from an base class other than System.Windows.Window.

I actually hacked it together, but am wondering how best to implement "for real" and could use some guidance.

Does anyone have an example of how to override IShell to exclude MainMenu/Toolbars/StatusBar?

Or perhaps an example of how to load a custom "ShellView", contained in the "application" from the bootstrapper?

Floating window doesn't show up in task bar

Is there a way to show floating window in task bar so that we can activate/show just this window from taks bar? I read that there is a property called "ShowInTaskb", and setting it to true would achieve this goal, but I couldn't figure out where to add it. Please advise. Ideally we should make this feature optional and can be configured from app.config or set programmatically. Thanks a lot for this great project!

Begging for open Merlin Editor's source code

Unit project urgent need to do a simple version of 3dsmax.Originally intended to be developed based gemini, but we have little foundation, the process being blocked.Merlin Editor is very similar to our aims, so We Begging for open Merlin Editor's source code,We are very eager to learn the experience of the project.
Begging beggin .....Thanks Thanks......

How to handle attempt to close application?

I need to query user about need to save changes before application close.
I implemented CanClose for view models of documents and query if user would like to Save,Discard or Cancel closing.

That works, but here are the problems:

  • When multiple documents are opened, user need to go though a lot of confirmation dialogs. It would be better to be able to show one dialog with all unsaved files.
  • There are invisible items which should be saved (like project file, it is not opened as document, but, nevertheless, should be saved)

The appropriate way to do that in Caliburn.Micro is to implement CanClose for ShellViewModel. I tried nesting the ShellViewModel and override CanClose method, but faced impossibility to substitute original ShellViewModel with my variant in MEF container.

I ended up with the following solution:

Application.Current.MainWindow.Closing += (sender, args) =>
{
....
};

But that does not look like a code which plays well with Caliburn.Micro and Gemini...

Do you have advice how to do that better?

Looking for Chinese friends, develop Gemini projects together. 寻找用Gemini ide做开发的**朋友,一起开发项目。

寻找用Gemini ide做开发的**朋友,一起开发项目。我在湖北武汉,用Gemini ide开发一个类似3dsmax的项目,遇到了很多的困难,望能有同样爱好的朋友联系我,我们一起开发。如果需要费用,我可以和单位商量以劳务费的方式提供报酬。请有意者联系我:QQ 550672121 Tel:13545039686
事情紧急,没有办法,只能在此发帖,请楼主不要删除这个帖子。谢谢。

Looking to do with the development of the Chinese Gemini ide friends, develop projects together. I was in Wuhan, with Gemini ide 3dsmax developing a similar project encountered many difficulties, hope to have the same loving friends contact me, we have developed together. If necessary expenses, I can talk to and unit labor costs in the way of providing compensation. Interested parties please contact me: QQ 550672121 Tel: 13545039686
Urgency of the matter, there is no way, only in this post, please do not delete this post landlord. Thank you.

Dragging ToolBarItems Causes Binding and Display Failures

I have come across two problems with the current ToolBar styling:

A. The tool bar images are currently getting used as a single static instance. Even with the property x:Shared="False" moving the ToolBar one over another will cause a rendering failure.

imageerror

Solution:

In the ToolTip Styles.xaml, include the image source as a ContentTemplate

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:cal="http://www.caliburnproject.org">
    <Style x:Key="ToolBarToggleButton" TargetType="{x:Type ToggleButton}" 
           BasedOn="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image x:Shared="false" Source="{Binding Icon}">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Setter Property="Width" Value="16" />
                                <Setter Property="Height" Value="16" />
                                <Setter Property="Stretch" Value="Fill" />
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Opacity" Value="0.5" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ToolTip" Value="{Binding FullToolTip}" />
        <Setter Property="ToolTipService.IsEnabled" Value="{Binding HasToolTip}" />
        <Setter Property="IsChecked" Value="{Binding IsChecked}" />
        <Setter Property="cal:Action.Target" Value="{Binding}" />
        <Setter Property="cal:Message.Attach" Value="{Binding ActionText}" />
    </Style>

    <Style x:Key="ToolBarButton" TargetType="{x:Type Button}" 
           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image x:Shared="false" Source="{Binding Icon}">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Setter Property="Width" Value="16" />
                                <Setter Property="Height" Value="16" />
                                <Setter Property="Stretch" Value="Fill" />
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Opacity" Value="0.5" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ToolTip" Value="{Binding FullToolTip}" />
        <Setter Property="ToolTipService.IsEnabled" Value="{Binding HasToolTip}" />
        <Setter Property="cal:Action.Target" Value="{Binding}" />
        <Setter Property="cal:Message.Attach" Value="{Binding ActionText}" />
    </Style>
</ResourceDictionary>

Now we have:

imageerrorsolved

No other changes required.

B. When the drag operation shown above occurs, this also breaks the Message.Attach and ToolTip bindings.

I have not yet got a solution to this one as I have just found it. I will work on this tonight and provide an update in due course.

Binding Failure on ToolBar Container Dragging

I have come across three problems with the current ToolBar styling:

First:

The tool bar images are currently getting used as a single static instance. Even with the property x:Shared="False" moving the ToolBar one over another will cause a rendering failure.

imageerror

Solution:

In the ToolTip Styles.xaml, include the image source as a ContentTemplate

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:cal="http://www.caliburnproject.org">
    <Style x:Key="ToolBarToggleButton" TargetType="{x:Type ToggleButton}" 
           BasedOn="{StaticResource {x:Static ToolBar.ToggleButtonStyleKey}}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image x:Shared="false" Source="{Binding Icon}">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Setter Property="Width" Value="16" />
                                <Setter Property="Height" Value="16" />
                                <Setter Property="Stretch" Value="Fill" />
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Opacity" Value="0.5" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ToolTip" Value="{Binding FullToolTip}" />
        <Setter Property="ToolTipService.IsEnabled" Value="{Binding HasToolTip}" />
        <Setter Property="IsChecked" Value="{Binding IsChecked}" />
        <Setter Property="cal:Action.Target" Value="{Binding}" />
        <Setter Property="cal:Message.Attach" Value="{Binding ActionText}" />
    </Style>

    <Style x:Key="ToolBarButton" TargetType="{x:Type Button}" 
           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Image x:Shared="false" Source="{Binding Icon}">
                        <Image.Style>
                            <Style TargetType="Image">
                                <Setter Property="Width" Value="16" />
                                <Setter Property="Height" Value="16" />
                                <Setter Property="Stretch" Value="Fill" />
                                <Style.Triggers>
                                    <Trigger Property="IsEnabled" Value="False">
                                        <Setter Property="Opacity" Value="0.5" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Image.Style>
                    </Image>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ToolTip" Value="{Binding FullToolTip}" />
        <Setter Property="ToolTipService.IsEnabled" Value="{Binding HasToolTip}" />
        <Setter Property="cal:Action.Target" Value="{Binding}" />
        <Setter Property="cal:Message.Attach" Value="{Binding ActionText}" />
    </Style>
</ResourceDictionary>

Now we have:

imageerrorsolved

No other changes required.

Second:

The same dragging procedure the ToolTip and ToolTipService bindings also get corrupted - at this stage I am not sure of the underlying reason. The quick solution is to do what I have done with the image above and add the ToolTip to the Image. However, this causes the ToolTip only to show when over the Image and not when hovering over the very edge of the button.

Partial Solution:

Add the ToolTip to the Image.

Third:

When the drag operation shown above occurs, this also breaks the Caliburn property bindings

<Setter Property="cal:Action.Target" Value="{Binding}" />
<Setter Property="cal:Message.Attach" Value="{Binding ActionText}" />

I have not yet got a solution to this one as I have just found it. I will work on this tonight and provide an update in due course, but if anyone can help with this as I am new to WPF, it would be appreciated.

Advice on how Best to Execute IDocument Specific Behaviors on KeyGestures

I love this framework, it has taken me a while to get my teeth stuck into it, but now my development is flying along!

Despite the above, i am trying to do something simple and failing. All I want to do is add a ToolBar button that saves the current document. To do this I have added a Save method to IDocument and add the ToolBar items like

Shell.ToolBars.Items.Add(new ToolBarModel
{
    new ToolBarItem("Open", OpenFile)
        .WithVectorGraphic("appbar_folder")
        .WithGlobalShortcut(ModifierKeys.Control, Key.O),
    ToolBarItemBase.Separator,
    new ToolBarItem("Save", SaveFile)
        .WithVectorGraphic("appbar_book")
        .WithGlobalShortcut(ModifierKeys.Control, Key.S)
        .WithToolTipText("ToolTip Text")
});

where OpenFile is as-per Gemini core code

private IEnumerable<IResult> OpenFile()
{
    var dialog = new OpenFileDialog();
    yield return Show.CommonDialog(dialog);
    yield return Show.Document(dialog.FileName);
}

My problem is my SaveFile method. All I want to do is

public async Task SaveFile()
{
    IDocument document = Shell.ActiveItem;
    try
    {
        mainWindow = IoC.Get<IMainWindow>();
        mainWindow.Shell.StatusBar.Items[(int)StatusBarItem.StatusMessage].Message =
            String.Format("Writing to file '{0}'...", document.FilePath);
        mainWindow.ProgressVisibility = System.Windows.Visibility.Visible;
        await Task.Factory.StartNew(() => document.Save());
    }
    finally
    {
        mainWindow.Shell.StatusBar.Items[(int)StatusBarItem.StatusMessage].Message = "Ready";
        mainWindow.ProgressVisibility = System.Windows.Visibility.Collapsed;
    }
}

but I can't as the ToolBar constructor expects a Func<IEnumerable<IResult>>.

Why is this implemented this way, and how can I use this sort of action to do as I want?

I am tempted to write a wrapper to give me what I need

public class LambdaResultAsync : IResult
{
    private readonly System.Action action;

    /// <summary>
    /// Default constructor.
    /// </summary>
    /// <param name="action">The action to be executed.</param>
    public LambdaResultAsync(System.Action action)
    {
        this.action = action;
    }

    /// <summary>
    /// Execute the required action on a background thread.
    /// </summary>
    /// <param name="context">The execution context.</param>
    public async void Execute(CoroutineExecutionContext context)
    {
        await Task.Factory.StartNew(() => action());
        Completed(this, new ResultCompletionEventArgs());
    }

    /// <summary>
    /// Event handler for the task completion.
    /// </summary>
    public event EventHandler<ResultCompletionEventArgs> Completed;
}

But am I missing something?
Thanks for your time.

How to Add a Document Window to the Gemini.Demo Project Continued

Thanks to Boss's help. But my errors still comes out. I change the code,Now the code in ViewModels is:
image
The errors is :
image

As your direct,I readed the detail of the errors,but can not find some ways to do it .

Maybe someplace in Gemini.Demo I need to Custumize, but I can not find the place,please give me some introduction.Thanks a lot.

MenuItem or ToolbarItem commands still execute even if item is disabled when using Global Shortcuts

I have a MenuItem with a Global Shortcut and the MenuItem is disabled. Obviously clicking on the disabled MenuItem does nothing , but if I use the shortcut, e.g: Ctrl+S, the command behind the MenuItem gets called, irrespective of if the MenuItem can be executed or not - even if there is no active document. It seems as though the command does not get enabled/disabled when the MenuItem can execute or not.

This is applicable to ToolbarItems as well as MenuItems

Making sense of Inspector module approach

Okay, first thing first: gemini project is great! Thank you @tgjones for your work!

I'm using gemini Inspectors module in my app.
My problem is, that i can see the inspector, generated with documentation approach, but the values i edit doesnt update my ViewModel and i cant understand what is wrong even after browsing gemini source code and FilterDesigner demo.

So, my basic approach is:

  1. Create the ViewModel class that have string "Name" property and implements "INotifyPropertyChanged"
  2. When this ViewModel is selected i manualy create inspector for "Name" property using "InspectableObjectBuilder" class and "WithObjectProperties" method, passing apropriate property filter labda.
    I can see "Name" property editor with actual value after that.
  3. I change property value in editor and nothing happens (though property setter is public).

So what did i miss?

Turn Gemini.Modules.Metro into a theme, and create interface for Gemini themes

As per @4ux-nbIx's suggestion in #57:

By the way, since we're talking about theming here, I wanted to share another idea. Looking at Gemini.Metro module I think that it should be a theme actually, i.e. it should be able to provide a resource dictionary with all it's nice stuff, like current Gemini themes, and it should also be able to hook into Caliburn.Micro WindowManager to provide MetroWindow instances instead of normal windows. So I suggest to make themes a little smarter, i.e. it should be some MEF exported interface with a name and may be some other useful properties and an ability to integrate into the app as deep as they need to. This way it'll be at least possible to gather all available themes and display a combo box in options dialog. What do you think.

How to Add a Document Windows to the Gemini.Demo Project

Hi

I need add a Document Window just like the HomeView Windows to the Gemini.Demo project and custumize the Menu items.I custumized three place in the Gemini.Demo project,the detail :

In Gemini.Demo.Modules.Home.Views
I added a WPF usercontrol,the file name is LzhEyeForModView.xaml,the code:

<UserControl x:Class="Gemini.Demo.Modules.Home.Views.LzhEyeForModView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

         xmlns:WinFormHost="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"  
         xmlns:WinFormControls="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
         xmlns:LzhCtlforEye="clr-namespace:lzhWinFromCtlforEyeModel;assembly=lzhWinFromCtlforEyeModel"

         mc:Ignorable="d" 
         d:DesignHeight="300" d:DesignWidth="300">
<Grid>
    <WinFormHost:WindowsFormsHost HorizontalAlignment="Left" Height="258" Margin="20,20,0,0" VerticalAlignment="Top" Width="260">

        <LzhCtlforEye:UserControl1 Height=" 100" Width="100"/>

    </WinFormHost:WindowsFormsHost>
</Grid>
In Gemini.Demo.Modules.Home.ViewModels
I added a class,the file name is LzhEyeForModViewModel.cs,the code is:

using Gemini.Framework;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gemini.Demo.Modules.Home.ViewModels
{
[DisplayName("Home View Model")]
[Export(typeof(HomeViewModel))]
public class LzhEyeForModViewModel : Document
{

    public LzhEyeForModViewModel()
    {
        DisplayName = "三维建模";
    }
}

}

In the Gemini.Demo.Modules.Home
I custumize the Module.cs file, the code is:

using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using Caliburn.Micro;
using Gemini.Demo.Modules.Home.ViewModels;
using Gemini.Framework;
using Gemini.Framework.Results;
using Gemini.Modules.MainMenu.Models;
using Gemini.Modules.PropertyGrid;

namespace Gemini.Demo.Modules.Home
{
[Export(typeof(IModule))]
public class Module : ModuleBase
{
[Import]
private IPropertyGrid _propertyGrid;

    public override IEnumerable<IDocument> DefaultDocuments
    {
        get
        {
            yield return IoC.Get<HomeViewModel>();
            yield return IoC.Get<HelixViewModel>();
            yield return IoC.Get<LzhEyeForModViewModel>();

        }
    }

    public override void Initialize()
    {
        MainMenu.All
            .First(x => x.Name == "View")
            .Add(new MenuItem("欢迎", OpenHome));

        MainMenu.All
            .First(x => x.Name == "View")
            .Add(new MenuItem("螺旋管", OpenHelix));
        MainMenu.All
            .First(x => x.Name == "View")
            .Add(new MenuItem("三维建模", OpenLzhEyeForMod));
    }

    public override void PostInitialize()
    {
        _propertyGrid.SelectedObject = IoC.Get<HomeViewModel>();
        Shell.OpenDocument(IoC.Get<HomeViewModel>());
    }

    private IEnumerable<IResult> OpenHome()
    {
        yield return Show.Document<HomeViewModel>();
    }

    private IEnumerable<IResult> OpenHelix()
    {
        yield return Show.Document<HelixViewModel>();
    }

    private IEnumerable<IResult> OpenLzhEyeForMod()
    {
        yield return Show.Document<LzhEyeForModViewModel>();
    }
}

}
When the prog runs,it comes out errors:
The errors turn out in App.xaml,
The errors code is:<gemini:AppBootstrapper x:Key="bootstrapper" />
And the errors is:对类型“Gemini.AppBootstrapper”的构造函数执行符合指定的绑定约束调用时引发了异常
image

  My problem is : I do not custumize the App.xaml source code, why it turns error? How can I add a document window to the Gemini.Demo project ?

ApplicationState.bin file is created in working directory instead of executable file direcotry.

Path of the state file is hard-coded like .\ApplicationState.bin where dot is resolved into working directory of the current process. Which may not always be the same folder where executable is located.

The case is when application which uses Gemini is associated with the certain type of file. When you double click on this file the application is launched with directory of that file set as working directory of the application process which leads to ApplicationState.bin being saved into that directory. Every time you open file with an Gemini app there state file is persisted in that folder.

It would be really great if Gemini allowed to specify location of ApplicationState.bin file or at least always save it to executable file directory (AppDomain.CurrentDomain.BaseDirectory)

How to customize the Gemini ide

Hi

I download the Gemini sourcecode. Run it in such enviroment:Win7,Visual studio 2012.

I want to customize the ide UI. So I did like this:

To customize Gemini.Demo.FilterDesigner UI,I go to the Gemini.Modules.Inspector source code , and find the Module.cs file,Open the c# source code,I fine the code like this:

public override void Initialize()
{
MainMenu.All.First(x => x.Name == "View")
.Add(new MenuItem("Inspector", OpenInspector));
}

I note the source code,then the code like this:

public override void Initialize()
{
//MainMenu.All.First(x => x.Name == "View")
//.Add(new MenuItem("Inspector", OpenInspector));
}

Then run the solution ,and set the Gemini.Demo.FilterDesigner as the StartOne project.When it runs, I find in Main menu ,in the View menu ,the "Inspector" disapeared. It is just I want to have.

But when the program runs ,I find the "Inspector"tool box is aready loaded and settled to the right of the windows,I want the "Inspector" tool box will not loaded when the program runs ,How can I customize the source code?

Needs help ,thanks a lot.

Opening Tool if already loaded on startup causes multiple tools.

Steps to reproduce:

  1. Run demo project(s)
  2. Open any tool from menu (toolbox, output, etc.)
  3. Close
  4. Restart
  5. Select tool from menu again

Thought a workaround would be to check for existence of tool in Shell.Tools collection, but the collection does not seem to be refreshed upon startup (guessing the items are loading via AvalonDock.Layout file).

Error when docking

Sometimes the docking fails. I have recreated the error in the sample Project.

Just start the sample Project (make sure that the file ApplicationState.bin is deleted) and then take the Inspector tool pane and drop it on the lower or upper part of the compass in the middle. The whole document pane disappears and nothing but application shutdown works. Attached is an image that decribes where to drop the pane. If you start the application again the pane is located at the bottom but with no height. To recreate the issue you need to delete ApplicationState.bin.
gemini-dock

ToolbarItem Tooltip - need more info

How can the Tool Tips for ToolBarItem's display more than just the Global shortcut key (if provided)?
Scenario:
Create a ToolBarItem: var runItem = new ToolBarItem("Run", Run, CanRun).WithIcon();
Result: A toolbar item with the correct Icon is added into my ToolbarModel, but the tooltip is blank/empty.

If I add the below line to that statement, the tooltip with the Hotkey/Shortcut is displayed.
.WithGlobalShortcut(System.Windows.Input.ModifierKeys.None, System.Windows.Input.Key.F5)

Now what about the Text/Name of the ToolBarItem? Surely that should be displayed in the tooltip when an Icon is used?

LoadState doesn't use IEditorProvidors to load documents

LoadState is opening empty document windows that aren't using my defined IEditorProvidors to populate them. I would assume that when the shell restores my state that it would use the providers to populate them, but break points are indicating that they are not.

EDIT: I figured it out. For anyone else who comes across this later looking for an answer. I needed to add an export to my document class, and then override LoadState and SaveState in the class. the code editor demo shows how to do this.

No way to change/remove default menubar items

The MainMenu module implements a basic menu structure. If I don't wish to use this structure, there does not appear to be any easy way to override it.

For example, I wanted to change the Open item's Name to "Open Project" but there is no setter.

I tried to remove the open item, but that seems to break the internals and I get "sequence does not contain element" errors.

Am I missing something? Is there an easy way to override the default MainMenu setup?

Document.CloseCommand CanExecute calls CanClose

From the Caliburn Micro docs:

CanClose – The default implementation always allows closing. Override this method to add custom guard logic.
TryClose – Call this method to close the screen. If the screen is being controlled by a Conductor, it asks the Conductor to initiate the shutdown process for the Screen. [...] In both scenarios the CanClose logic will be invoked and if allowed, OnDeactivate will be called with a value of true.

It seems the intended behavior is for CanClose to display warnings such as "Do you want to save" etc, which makes it unsuitable for a CanExecute callback.

Use of MonoGame

Is it possible that you create also a Example with MonoGame?

I tried to switch from XNA to MonoGame myself, but I could not get it working!

Since XNA is no longer Developed, and MonoGame is nearly API compatible it would be nice if you support this also.

Need to learn the source code of "Merlin Editor"

Hi ,I download the source code of Gemini .But in the source code ,I can not find the source code of the "Merlin Editor" . I want to design a 3dmax like IDE using Gemini,the "Merlin Editor" is very similar to my aim. Can you provide the "Merlin Editor" source code? Or provide the download Url? My Gmail is [email protected] .Thanks a lot.

3d draw

Hi all!
I've made my parser to my 3d library, that actually needs an handle of the object to draw it (this in winforms projects)
how can I do this thing using gemini? I wish a thing like xna demo!

thanks in advance

Clearing Menu on startup causes error.

I used the demo app as a starting point for the application I am writing. I don't want a main menu for this application so I put the following code in the startup module.

    public override void PostInitialize()
    {
        MainMenu.Clear();
    }

This worked as of 0.5.0. When I installed 0.6.0 it crashes the application before it get's started.

I pulled the gemini project from github and edited the demo app and found it fails in the AppBootstrapper.

        DisplayRootViewFor<IMainWindow>();

An unhandled exception of type 'System.ArgumentNullException' occurred in WindowsBase.dll
Additional information: Value cannot be null.

How to skin the StatusBar and the ToolBar using MahApps Metro

All, I am having difficulty attempting to style the ToolBar and StatusBar using MahApps metro. There is an example of how to do this for the main window, but I can seem to apply the same principles to skin the Tool/Status bars. Can anyone point me in the right direction here please?

Changed Namespaces, Style Templates in GraphEditor can't be located?

Hi Tim,

First - thanks for sharing. I've been tinkering for a while now and I'm starting to understand how things work a little better than last year.

I'm trying to develop an application with a new module similar to the FilterDesigner module, but I'm hitting a brick wall. In my infinite wisdom, I changed the namespaces to match paradigm I have going with other solutions of mine (so I'm sure this is all my fault). I have things "mostly" working at this point, but I'm wondering if you can shed some light on the subject.

The behavior of the problem was that when I loaded a new document (of new module type), I received an exception. I tracked the issue down to Gemini.Modules.GraphEditor.ZoomAndPanControl\OnApplyTemplate. "_content" had not been set to anything and its value was 'null'. This can be reproduced by commenting out a Style in Themes\Generic.xaml

I added a quick one-line fix to verify that "_content" was set before trying to access it, then continued researching.

I eventually figured out that my new module (in the "demo" EXE) could not locate the Style in the NewNamespace.Module.GraphEditor project. I can get around this exception by copying Generic.xaml to my "demo" project and adding local reference to it in the MergedDictionary section of App.xaml.

I can then see the Graph when I load a document.

My issue at this point is that I cannot get any "Elements" added to the Graph. Drag/Drop causes my new module's DynamicElement to be instanced, but it never appears on the Graph.

I have exhausted Google - most posts claim adding "ThemeInfo" to the AssemblyInfo will solve this, but it is already there (Gemini.Demo.FilterDesigner was the template).

Any ideas/advice?

If you have no idea, "change the namespaces back" would be an acceptable answer.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.